Class DisconnectMessage

java.lang.Object
com.jme3.network.AbstractMessage
com.jme3.network.message.DisconnectMessage
All Implemented Interfaces:
Message

public class DisconnectMessage extends AbstractMessage
Represents a disconnect message.
Author:
Lars Wesselius, Paul Speed
  • Field Details

    • SERIALIZER_ID

      public static final short SERIALIZER_ID
      Serializer id reserved for backwards-compatible disconnect messages.
      See Also:
    • KICK

      public static final String KICK
      Disconnect type used when a client is kicked by the server.
      See Also:
    • USER_REQUESTED

      public static final String USER_REQUESTED
      Disconnect type used when the user requested closure.
      See Also:
    • ERROR

      public static final String ERROR
      Disconnect type used when an error closed the connection.
      See Also:
    • FILTERED

      public static final String FILTERED
      Disconnect type used when a message or client was filtered.
      See Also:
  • Constructor Details

    • DisconnectMessage

      public DisconnectMessage()
      Creates an empty disconnect message for serialization.
  • Method Details

    • getReason

      public String getReason()
      Returns the disconnect reason text.
      Returns:
      the disconnect reason, or null
    • setReason

      public void setReason(String reason)
      Sets the disconnect reason text.
      Parameters:
      reason - the disconnect reason
    • getType

      public String getType()
      Returns the disconnect category.
      Returns:
      the disconnect type
    • setType

      public void setType(String type)
      Sets the disconnect category.
      Parameters:
      type - the disconnect type
    • toString

      public String toString()
      Overrides:
      toString in class Object