Package org.kendar.sync.lib.protocol
Class SyncEndMessage
java.lang.Object
org.kendar.sync.lib.protocol.Message
org.kendar.sync.lib.protocol.SyncEndMessage
Message sent by the client to the server to signal the end of a synchronization session.
-
Constructor Summary
ConstructorsConstructorDescriptionSyncEndMessage(boolean isBackup, int filesTransferred, int filesDeleted) Creates a new sync end message. -
Method Summary
Modifier and TypeMethodDescriptionprotected Messagedeserialize(ByteContainer buffer) intintGets the message type for this message.booleanisBackup()protected voidserialize(ByteContainer buffer) voidsetBackup(boolean backup) voidsetFilesDeleted(int filesDeleted) voidsetFilesTransferred(int filesTransferred) Methods inherited from class org.kendar.sync.lib.protocol.Message
deserialize, deserialize, getConnectionId, getPacketId, getSessionId, initialize, serialize
-
Constructor Details
-
SyncEndMessage
public SyncEndMessage() -
SyncEndMessage
public SyncEndMessage(boolean isBackup, int filesTransferred, int filesDeleted) Creates a new sync end message.- Parameters:
isBackup- Whether this was a backup operation (true) or restore operation (false)filesTransferred- The number of files transferredfilesDeleted- The number of files deleted
-
-
Method Details
-
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
-
isBackup
public boolean isBackup() -
setBackup
public void setBackup(boolean backup) -
getFilesTransferred
public int getFilesTransferred() -
setFilesTransferred
public void setFilesTransferred(int filesTransferred) -
getFilesDeleted
public int getFilesDeleted() -
setFilesDeleted
public void setFilesDeleted(int filesDeleted)
-