Package marauroa.common.net.message
Class MessageP2SCreateCharacter
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageP2SCreateCharacter
- All Implemented Interfaces:
Serializable
This message indicate the server to create a character for the specified user
- See Also:
Message
-
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 messageMessageP2SCreateCharacter(Channel source, String credentials, String forwardedFor, String username, String character, RPObject template)Constructor with a TCP/IP source/destination of the message and character name and character configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the character nameReturns the credentialsthe ip-address this request is forwarded forReturns the object templateReturns the usernamevoidSerialize the object from an ObjectInputtoString()This method returns a String that represent the objectvoidwriteObject(OutputSerializer out)Serialize the object into an ObjectOutputMethods inherited from class marauroa.common.net.message.Message
getAddress, getChannel, getClientID, getMessageTimestamp, getProtocolVersion, getType, internalToString, isPerception, isSkippable, readFromMap, requiresPerception, setChannel, setClientID, setProtocolVersion, writeToJson
-
Constructor Details
-
MessageP2SCreateCharacter
public MessageP2SCreateCharacter()Constructor for allowing creation of an empty message -
MessageP2SCreateCharacter
public MessageP2SCreateCharacter(Channel source, String credentials, String forwardedFor, String username, String character, RPObject template)Constructor with a TCP/IP source/destination of the message and character name and character configuration.- Parameters:
source- TCP/IP address associated to this messagecredentials- authenticationforwardedFor- forwarded forusername- name of accountcharacter- the desired character nametemplate- a RPObject that contains attributes that will be used on the created character.
-
-
Method Details
-
getCredentials
Returns the credentials- Returns:
- the credentials
-
getUsername
Returns the username- Returns:
- the username
-
getCharacter
Returns the character name- Returns:
- the character name
-
getForwardedFor
the ip-address this request is forwarded for- Returns:
- IP-address
-
getTemplate
Returns the object template- Returns:
- the object template
-
toString
This method returns a String that represent the object -
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
-