buildCommand method

  1. @override
String buildCommand()
override

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

Implementation

@override
String buildCommand() {
  StringBuffer serverCommandBuffer = StringBuffer('notify:fetch:');
  try {
    if (notificationId.isEmpty) {
      throw InvalidSyntaxException(
          'Notification-id is empty. Notification-id is mandatory');
    }
  } on Error {
    throw InvalidSyntaxException(
        'Notification-id is not set. Notification-id is mandatory');
  }
  serverCommandBuffer.write('$notificationId\n');
  return serverCommandBuffer.toString();
}