org.jdesktop.wonderland.client.comms
Interface ClientConnection

All Known Implementing Classes:
BaseConnection, CellCacheConnection, CellChannelConnection, CellEditChannelConnection, WonderlandSessionImpl.SessionInternalHandler

public interface ClientConnection

This class provides the client side instance of a particular Wonderland service. All interaction with a service on a given server are handled by this a ClientConnection.

The client starts out in the DISCONNECTED status, meaning it is not associated with any WonderlandSession. Once a client is connected to a session, it is able to communicate with the server.

Author:
kaplanj

Nested Class Summary
static class ClientConnection.Status
          status of this listener
 
Method Summary
 void connected(WonderlandSession session)
          Notify this client that it is connected to given session
 void disconnected()
          Notify this client that it is disconnected from the current session
 ConnectionType getConnectionType()
          Get the type this client represents.
 WonderlandSession getSession()
          Get the session this client is connected to
 ClientConnection.Status getStatus()
          Get the status of this client
 void messageReceived(Message message)
          Handle a message sent to this client
 

Method Detail

getConnectionType

ConnectionType getConnectionType()
Get the type this client represents.

Returns:
the type of client

getSession

WonderlandSession getSession()
Get the session this client is connected to

Returns:
the session this client is connected to, or null if the client is not connected to a session.

getStatus

ClientConnection.Status getStatus()
Get the status of this client

Returns:
the status of the client

connected

void connected(WonderlandSession session)
Notify this client that it is connected to given session

Parameters:
session - the session the client is now connected to

disconnected

void disconnected()
Notify this client that it is disconnected from the current session


messageReceived

void messageReceived(Message message)
Handle a message sent to this client

Parameters:
message - the message


Open Wonderland - http://openwonderland.org