Package org.kendar.sync.lib.protocol
Class ConnectMessage
java.lang.Object
org.kendar.sync.lib.protocol.Message
org.kendar.sync.lib.protocol.ConnectMessage
Message sent by the client to connect to the server.
Contains authentication information and the target folder.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectMessage(String username, String password, String targetFolder, int maxPacketSize, int maxConnections, boolean dryRun, String hostName) Creates a new connection message. -
Method Summary
Modifier and TypeMethodDescriptionprotected Messagedeserialize(ByteContainer buffer) intintGets the message type for this message.booleanisDryRun()protected voidserialize(ByteContainer buffer) voidsetDryRun(boolean dryRun) voidsetMaxConnections(int maxConnections) voidsetMaxPacketSize(int maxPacketSize) voidsetPassword(String password) voidsetTargetFolder(String targetFolder) voidsetUsername(String username) Methods inherited from class org.kendar.sync.lib.protocol.Message
deserialize, deserialize, getConnectionId, getPacketId, getSessionId, initialize, registerMessageType, serialize
-
Constructor Details
-
ConnectMessage
public ConnectMessage() -
ConnectMessage
public ConnectMessage(String username, String password, String targetFolder, int maxPacketSize, int maxConnections, boolean dryRun, String hostName) Creates a new connection message.- Parameters:
username- The username for authenticationpassword- The password for authenticationtargetFolder- The virtual target folder namemaxPacketSize- The maximum packet size supported by the clientmaxConnections- The maximum number of parallel connections supported by the clientdryRun- Whether this is a dry run (no actual file operations)
-
-
Method Details
-
deserialize
- Specified by:
deserializein classMessage
-
getMessageType
Description copied from class:MessageGets the message type for this message.- Specified by:
getMessageTypein classMessage- Returns:
- The message type
-
serialize
-
getUsername
-
setUsername
-
getPassword
-
setPassword
-
getTargetFolder
-
setTargetFolder
-
getMaxPacketSize
public int getMaxPacketSize() -
setMaxPacketSize
public void setMaxPacketSize(int maxPacketSize) -
getMaxConnections
public int getMaxConnections() -
setMaxConnections
public void setMaxConnections(int maxConnections) -
isDryRun
public boolean isDryRun() -
setDryRun
public void setDryRun(boolean dryRun)
-