Package marauroa.common.net.message
Class MessageS2CTransferREQ
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageS2CTransferREQ
- All Implemented Interfaces:
Serializable
Prior to transfer we send client a transfer offer so it can decide whenever to ACK it and have it
transfered or rejected it and use a local cache instead.
- 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 messageMessageS2CTransferREQ(Channel source, List<TransferContent> contents)creates a new MessageS2CTransferREQ -
Method Summary
Modifier and TypeMethodDescriptiongets the contentvoidSerialize the object from an ObjectInputbooleandoes this message require a perceptiontoString()voidwriteObject(OutputSerializer out)Serialize 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, readFromMap, setChannel, setClientID, setProtocolVersion
-
Constructor Details
-
MessageS2CTransferREQ
public MessageS2CTransferREQ()Constructor for allowing creation of an empty message -
MessageS2CTransferREQ
creates a new MessageS2CTransferREQ- Parameters:
source- socket channelcontents- content offered for transfer
-
-
Method Details
-
getContents
gets the content- Returns:
- content
-
requiresPerception
public boolean requiresPerception()does this message require a perception- Overrides:
requiresPerceptionin classMessage- Returns:
- true, if this message requires a perception, false otherwise
-
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
-
writeToJson
Description copied from class:MessageSerialize the object to json- Overrides:
writeToJsonin classMessage- Parameters:
out- output buffer
-
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
-