Package org.kendar.sync.lib.protocol
Class FileEndAckMessage
java.lang.Object
org.kendar.sync.lib.protocol.Message
org.kendar.sync.lib.protocol.FileEndAckMessage
Message sent in response to a file end message to acknowledge that the file has been successfully received.
-
Constructor Summary
ConstructorsConstructorDescriptionFileEndAckMessage(String relativePath, boolean success, String errorMessage) Creates a new file end acknowledgment message. -
Method Summary
Modifier and TypeMethodDescriptionprotected Messagedeserialize(ByteContainer buffer) static FileEndAckMessageCreates a new file end acknowledgment message for a failed acknowledgment.Gets the message type for this message.booleanprotected voidserialize(ByteContainer buffer) voidsetErrorMessage(String errorMessage) voidsetRelativePath(String relativePath) voidsetSuccess(boolean success) static FileEndAckMessageCreates a new file end acknowledgment message for a successful acknowledgment.Methods inherited from class org.kendar.sync.lib.protocol.Message
deserialize, deserialize, getConnectionId, getPacketId, getSessionId, initialize, registerMessageType, serialize
-
Constructor Details
-
FileEndAckMessage
public FileEndAckMessage() -
FileEndAckMessage
Creates a new file end acknowledgment message.- Parameters:
relativePath- The relative path of the filesuccess- Whether the file was successfully receivederrorMessage- Error message if the file was not successfully received
-
-
Method Details
-
success
Creates a new file end acknowledgment message for a successful acknowledgment.- Parameters:
relativePath- The relative path of the file- Returns:
- A new file end acknowledgment message
-
failure
Creates a new file end acknowledgment message for a failed acknowledgment.- Parameters:
relativePath- The relative path of the fileerrorMessage- The reason for the failure- Returns:
- A new file 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
-
getRelativePath
-
setRelativePath
-
isSuccess
public boolean isSuccess() -
setSuccess
public void setSuccess(boolean success) -
getErrorMessage
-
setErrorMessage
-