Package marauroa.common.net.message
Class MessageS2CUpdate
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageS2CUpdate
- All Implemented Interfaces:
Serializable
Transfers an update
-
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
ConstructorDescriptionConstructor for allowing creation of an empty messageMessageS2CUpdate(Channel source, byte[] update)
creates a new message -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
gets the updatevoid
Serialize the object from an ObjectInputtoString()
void
writeObject(OutputSerializer out)
Serialize the object into an ObjectOutputvoid
writeToJson(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, requiresPerception, setChannel, setClientID, setProtocolVersion
-
Constructor Details
-
MessageS2CUpdate
public MessageS2CUpdate()Constructor for allowing creation of an empty message -
MessageS2CUpdate
creates a new message- Parameters:
source
- socket channelupdate
- update
-
-
Method Details
-
getUpdate
public byte[] getUpdate()gets the update- Returns:
- update
-
toString
-
writeObject
Description copied from class:Message
Serialize the object into an ObjectOutput- Specified by:
writeObject
in interfaceSerializable
- Overrides:
writeObject
in classMessage
- Parameters:
out
- the output serializer.- Throws:
IOException
- if the serializations fails
-
writeToJson
Description copied from class:Message
Serialize the object to json- Overrides:
writeToJson
in classMessage
- Parameters:
out
- output buffer
-
readObject
Description copied from class:Message
Serialize the object from an ObjectInput- Specified by:
readObject
in interfaceSerializable
- Overrides:
readObject
in classMessage
- Parameters:
in
- the input serializer- Throws:
IOException
- if the serializations fails
-