Class DisconnectMessage
java.lang.Object
com.jme3.network.AbstractMessage
com.jme3.network.message.DisconnectMessage
- All Implemented Interfaces:
Message
Represents a disconnect message.
- Author:
- Lars Wesselius, Paul Speed
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA message-specific serializer to avoid compatibility issues between versions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDisconnect type used when an error closed the connection.static final StringDisconnect type used when a message or client was filtered.static final StringDisconnect type used when a client is kicked by the server.static final shortSerializer id reserved for backwards-compatible disconnect messages.static final StringDisconnect type used when the user requested closure. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractMessage
isReliable, setReliable
-
Field Details
-
SERIALIZER_ID
public static final short SERIALIZER_IDSerializer id reserved for backwards-compatible disconnect messages.- See Also:
-
KICK
Disconnect type used when a client is kicked by the server.- See Also:
-
USER_REQUESTED
Disconnect type used when the user requested closure.- See Also:
-
ERROR
Disconnect type used when an error closed the connection.- See Also:
-
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
Returns the disconnect reason text.- Returns:
- the disconnect reason, or null
-
setReason
Sets the disconnect reason text.- Parameters:
reason- the disconnect reason
-
getType
-
setType
Sets the disconnect category.- Parameters:
type- the disconnect type
-
toString
-