Class SyncEndAckMessage

java.lang.Object
org.kendar.sync.lib.protocol.Message
org.kendar.sync.lib.protocol.SyncEndAckMessage

public class SyncEndAckMessage extends Message
Message sent by the server to the client in response to a sync end message to acknowledge the end of the synchronization session.
  • Constructor Details

    • SyncEndAckMessage

      public SyncEndAckMessage()
    • SyncEndAckMessage

      public SyncEndAckMessage(boolean success, String errorMessage)
      Creates a new sync end acknowledgment message.
      Parameters:
      success - Whether the synchronization was successful
      errorMessage - Error message if the synchronization was not successful
  • Method Details

    • success

      public static SyncEndAckMessage success()
      Creates a new sync end acknowledgment message for a successful acknowledgment.
      Returns:
      A new sync end acknowledgment message
    • failure

      public static SyncEndAckMessage failure(String errorMessage)
      Creates a new sync end acknowledgment message for a failed acknowledgment.
      Parameters:
      errorMessage - The reason for the failure
      Returns:
      A new sync end acknowledgment message
    • getMessageType

      public MessageType getMessageType()
      Description copied from class: Message
      Gets the message type for this message.
      Specified by:
      getMessageType in class Message
      Returns:
      The message type
    • deserialize

      protected Message deserialize(ByteContainer buffer)
      Specified by:
      deserialize in class Message
    • serialize

      protected void serialize(ByteContainer buffer)
      Specified by:
      serialize in class Message
    • isSuccess

      public boolean isSuccess()
    • setSuccess

      public void setSuccess(boolean success)
    • getErrorMessage

      public String getErrorMessage()
    • setErrorMessage

      public void setErrorMessage(String errorMessage)