Class MessageS2CServerInfo

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

public class MessageS2CServerInfo extends Message
The ServerInfo message is sent from server to client to inform client about any relevant info the server has to transmit. They are in the form of = This message also sent to client the list of RPClass that are contained at server at the time the message was sent. It is because of that, that RPClass definition must be load previously to game start.
  • Constructor Details

    • MessageS2CServerInfo

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

      public MessageS2CServerInfo(Channel source, String[] contents)
      Constructor with a TCP/IP source/destination of the message and the content.
      Parameters:
      source - The TCP/IP address associated to this message
      contents - the list of strings to describe the server.
  • Method Details

    • getContents

      public String[] getContents()
      This method returns the list of string that describe the server
      Returns:
      the list of strings to describe the server
    • 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
    • writeToJson

      public void writeToJson(StringBuilder out)
      Description copied from class: Message
      Serialize the object to json
      Overrides:
      writeToJson in class Message
      Parameters:
      out - output buffer