Package marauroa.common.net.message
Class MessageC2STransferACK
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageC2STransferACK
- All Implemented Interfaces:
Serializable
This message is for confirming server the content we want to be transfered to
us. This way client can implement a cache system to save bandwidth.
- Author:
- miguel
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.net.message.Message
Message.MessageType -
Field Summary
Fields inherited from class marauroa.common.net.message.Message
channel, clientid, CLIENTID_INVALID, protocolVersion, timestampMessage, type -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for allowing creation of an empty messageMessageC2STransferACK(Channel source, List<TransferContent> content) Constructor with a TCP/IP source/destination of the message and a list of the contents to confirm to server. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of contents that have been confirmed.voidreadFromMap(Map<String, Object> in) reads a message from a mapvoidSerialize the object from an ObjectInputtoString()voidSerialize the object into an ObjectOutputvoidwriteToJson(StringBuilder out) Serialize the object to jsonMethods inherited from class marauroa.common.net.message.Message
getAddress, getChannel, getClientID, getMessageTimestamp, getProtocolVersion, getType, internalToString, isPerception, isSkippable, requiresPerception, setChannel, setClientID, setProtocolVersion
-
Constructor Details
-
MessageC2STransferACK
public MessageC2STransferACK()Constructor for allowing creation of an empty message -
MessageC2STransferACK
Constructor with a TCP/IP source/destination of the message and a list of the contents to confirm to server.- Parameters:
source- The TCP/IP address associated to this messagecontent- the list of contents to confirm to server.
-
-
Method Details
-
getContents
Returns the list of contents that have been confirmed.- Returns:
- the list of contents that have been confirmed.
-
toString
-
writeObject
Description copied from class:MessageSerialize the object into an ObjectOutput- Specified by:
writeObjectin interfaceSerializable- Overrides:
writeObjectin classMessage- Parameters:
out- the output serializer.- Throws:
IOException- if the serializations fails
-
readObject
Description copied from class:MessageSerialize the object from an ObjectInput- Specified by:
readObjectin interfaceSerializable- Overrides:
readObjectin classMessage- Parameters:
in- the input serializer- Throws:
IOException- if the serializations fails
-
readFromMap
Description copied from class:Messagereads a message from a map- Overrides:
readFromMapin classMessage- Parameters:
in- Map to read from- Throws:
IOException- if the serializations fails
-
writeToJson
Description copied from class:MessageSerialize the object to json- Overrides:
writeToJsonin classMessage- Parameters:
out- output buffer
-