Package marauroa.common.net.message
Class MessageS2CCharacterList
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageS2CCharacterList
- All Implemented Interfaces:
Serializable
The CharacterListMessage is sent from server to client to inform client about
the possible election of character to play with.
-
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 messageMessageS2CCharacterList(Channel source, String[] characters)
Constructor with a TCP/IP source/destination of the message and a list with the characters available to be played.MessageS2CCharacterList(Channel source, Map<String,RPObject> characters)
Constructor with a TCP/IP source/destination of the message and a list with the characters available to be played. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the list of characters that the player ownsString[]
This method returns the list of characters that the player ownsvoid
Serialize the object from an ObjectInputtoString()
This method returns a String that represent the objectvoid
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
-
MessageS2CCharacterList
public MessageS2CCharacterList()Constructor for allowing creation of an empty message -
MessageS2CCharacterList
Constructor with a TCP/IP source/destination of the message and a list with the characters available to be played.- Parameters:
source
- The TCP/IP address associated to this messagecharacters
- the list of characters of the player
-
MessageS2CCharacterList
Constructor with a TCP/IP source/destination of the message and a list with the characters available to be played.- Parameters:
source
- The TCP/IP address associated to this messagecharacters
- the list of characters of the player
-
-
Method Details
-
getCharacters
This method returns the list of characters that the player owns- Returns:
- the list of characters that the player owns
-
getCharacterDetails
This method returns the list of characters that the player owns- Returns:
- the list of characters that the player owns
-
toString
This method returns a String that represent the object -
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
-
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
-