buildCommand method

  1. @override
String buildCommand()
override

Build the @ command to be sent to remote secondary for execution.

Implementation

@override
String buildCommand() {
  var sb = StringBuffer('monitor');
  if (strict) {
    sb.write(':strict');
  }
  if (selfNotificationsEnabled) {
    sb.write(':selfNotifications');
  }
  if (multiplexed) {
    sb.write(':multiplexed');
  }
  if (lastNotificationTime != null) {
    sb.write(':$lastNotificationTime');
  }
  if (regex != null && regex!.trim().isNotEmpty) {
    sb.write(' $regex');
  }
  sb.write('\n');
  return sb.toString();
}