Class MessageC2SCreateAccountWithToken

java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageC2SCreateAccountWithToken
All Implemented Interfaces:
Serializable

public class MessageC2SCreateAccountWithToken extends Message
This message indicate the server to create an account with token.
Author:
maxgmer
See Also:
Message
  • Constructor Details

    • MessageC2SCreateAccountWithToken

      public MessageC2SCreateAccountWithToken()
      Constructor for allowing creation of an empty message
    • MessageC2SCreateAccountWithToken

      public MessageC2SCreateAccountWithToken(Channel source, String username, String tokenType, String token, String language)
      Constructor with a TCP/IP source/destination of the message and username, token associated to the account to be created.
      Parameters:
      source - The TCP/IP address associated to this message
      username - desired username
      tokenType - token type
      token - authentication token
      language - client language
  • Method Details

    • getUsername

      public String getUsername()
      Returns desired account's username
      Returns:
      desired account's username
    • getTokenType

      public String getTokenType()
      Returns token type.
      Returns:
      token type
    • getToken

      public String getToken()
      Returns authentication token
      Returns:
      authentication token
    • getLanguage

      public String getLanguage()
      gets the language
      Returns:
      language
    • toString

      public String toString()
      This method returns a String that represent the object
      Overrides:
      toString in class Message
      Returns:
      a string representing the object.
    • writeObject

      public void writeObject(OutputSerializer out) throws IOException
      Description copied from class: Message
      Serialize the object into an ObjectOutput
      Specified by:
      writeObject in interface Serializable
      Overrides:
      writeObject in class Message
      Parameters:
      out - the output serializer.
      Throws:
      IOException - if the serializations fails
    • readObject

      public void readObject(InputSerializer in) throws IOException
      Description copied from class: Message
      Serialize the object from an ObjectInput
      Specified by:
      readObject in interface Serializable
      Overrides:
      readObject in class Message
      Parameters:
      in - the input serializer
      Throws:
      IOException - if the serializations fails
    • readFromMap

      public void readFromMap(Map<String,​Object> in) throws IOException
      Description copied from class: Message
      reads a message from a map
      Overrides:
      readFromMap in class Message
      Parameters:
      in - Map to read from
      Throws:
      IOException - if the serializations fails