Package org.kendar.sync.lib.protocol
Class SyncEndAckMessage
java.lang.Object
org.kendar.sync.lib.protocol.Message
org.kendar.sync.lib.protocol.SyncEndAckMessage
Message sent by the server to the client in response to a sync end message
to acknowledge the end of the synchronization session.
-
Constructor Summary
ConstructorsConstructorDescriptionSyncEndAckMessage(boolean success, String errorMessage) Creates a new sync end acknowledgment message. -
Method Summary
Modifier and TypeMethodDescriptionprotected Messagedeserialize(ByteContainer buffer) static SyncEndAckMessageCreates a new sync end acknowledgment message for a failed acknowledgment.Gets the message type for this message.booleanprotected voidserialize(ByteContainer buffer) voidsetErrorMessage(String errorMessage) voidsetSuccess(boolean success) static SyncEndAckMessagesuccess()Creates a new sync end acknowledgment message for a successful acknowledgment.Methods inherited from class org.kendar.sync.lib.protocol.Message
deserialize, deserialize, getConnectionId, getPacketId, getSessionId, initialize, serialize
-
Constructor Details
-
SyncEndAckMessage
public SyncEndAckMessage() -
SyncEndAckMessage
Creates a new sync end acknowledgment message.- Parameters:
success- Whether the synchronization was successfulerrorMessage- Error message if the synchronization was not successful
-
-
Method Details
-
success
Creates a new sync end acknowledgment message for a successful acknowledgment.- Returns:
- A new sync end acknowledgment message
-
failure
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
Description copied from class:MessageGets the message type for this message.- Specified by:
getMessageTypein classMessage- Returns:
- The message type
-
deserialize
- Specified by:
deserializein classMessage
-
serialize
-
isSuccess
public boolean isSuccess() -
setSuccess
public void setSuccess(boolean success) -
getErrorMessage
-
setErrorMessage
-