Class FileSyncMessageAck

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

public class FileSyncMessageAck extends Message
Message sent in response to a file end message to acknowledge that the file has been successfully received.
  • Constructor Details

    • FileSyncMessageAck

      public FileSyncMessageAck()
    • FileSyncMessageAck

      public FileSyncMessageAck(boolean success, String errorMessage)
      Creates a new file end acknowledgment message.
      Parameters:
      success - Whether the file was successfully received
      errorMessage - Error message if the file was not successfully received
  • Method Details

    • success

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

      public static FileSyncMessageAck failure(String errorMessage)
      Creates a new file end acknowledgment message for a failed acknowledgment.
      Parameters:
      errorMessage - The reason for the failure
      Returns:
      A new file 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)