Package com.jme3.network.base
Class DefaultServer.Connection
java.lang.Object
com.jme3.network.base.DefaultServer.Connection
- All Implemented Interfaces:
- HostedConnection,- MessageConnection
- Enclosing class:
- DefaultServer
- 
Field SummaryFields inherited from interface com.jme3.network.MessageConnectionCHANNEL_DEFAULT_RELIABLE, CHANNEL_DEFAULT_UNRELIABLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a read-only set of attribute names currently stored for this client session.voidCloses and removes this connection from the server sending the optional reason to the remote client.protected voidReturns the transport specific remote address of this connection as a string.<T> TgetAttribute(String name) Retrieves a previously stored session attribute or null if no such attribute exists.intgetId()Returns the server-unique ID for this client.Returns the Server instance that is hosting this connection.voidSends a message to the other end of the connection using the specified alternate channel.voidSends a message to the other end of the connection.setAttribute(String name, Object value) Sets a session attribute specific to this connection.toString()
- 
Constructor Details- 
Connectionpublic Connection(int channelCount) 
 
- 
- 
Method Details- 
getServerDescription copied from interface:HostedConnectionReturns the Server instance that is hosting this connection.- Specified by:
- getServerin interface- HostedConnection
 
- 
getIdpublic int getId()Description copied from interface:HostedConnectionReturns the server-unique ID for this client.- Specified by:
- getIdin interface- HostedConnection
 
- 
getAddressDescription copied from interface:HostedConnectionReturns the transport specific remote address of this connection as a string. This may or may not be unique per connection depending on the type of transport. It is provided for information and filtering purposes.- Specified by:
- getAddressin interface- HostedConnection
 
- 
sendDescription copied from interface:MessageConnectionSends a message to the other end of the connection.- Specified by:
- sendin interface- MessageConnection
 
- 
sendDescription copied from interface:MessageConnectionSends a message to the other end of the connection using the specified alternate channel.- Specified by:
- sendin interface- MessageConnection
 
- 
closeConnectionprotected void closeConnection()
- 
closeDescription copied from interface:HostedConnectionCloses and removes this connection from the server sending the optional reason to the remote client.- Specified by:
- closein interface- HostedConnection
 
- 
setAttributeDescription copied from interface:HostedConnectionSets a session attribute specific to this connection. If the value is set to null then the attribute is removed.- Specified by:
- setAttributein interface- HostedConnection
- Returns:
- The previous session value for this key or null if there was no previous value.
 
- 
getAttributeDescription copied from interface:HostedConnectionRetrieves a previously stored session attribute or null if no such attribute exists.- Specified by:
- getAttributein interface- HostedConnection
 
- 
attributeNamesDescription copied from interface:HostedConnectionReturns a read-only set of attribute names currently stored for this client session.- Specified by:
- attributeNamesin interface- HostedConnection
 
- 
toString
 
-