org.jdesktop.wonderland.client.comms
Class WonderlandSessionImpl.SessionInternalHandler

java.lang.Object
  extended by org.jdesktop.wonderland.client.comms.BaseConnection
      extended by org.jdesktop.wonderland.client.comms.WonderlandSessionImpl.SessionInternalHandler
All Implemented Interfaces:
ClientConnection
Enclosing class:
WonderlandSessionImpl

protected static class WonderlandSessionImpl.SessionInternalHandler
extends BaseConnection

Handle traffic over the session channel


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jdesktop.wonderland.client.comms.ClientConnection
ClientConnection.Status
 
Constructor Summary
WonderlandSessionImpl.SessionInternalHandler(WonderlandSessionImpl session)
           
 
Method Summary
 ConnectionType getConnectionType()
          Get the type this client represents.
 void handleMessage(Message message)
          Handle a message sent from the server.
 SessionInitializationMessage waitForInitialization()
          Wait for a session initialization message to be sent to the internal handler.
 
Methods inherited from class org.jdesktop.wonderland.client.comms.BaseConnection
addResponseListener, connect, connect, connected, disconnect, disconnected, getSession, getStatus, messageReceived, notifyResponseListener, send, send, sendAndWait, setStatus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WonderlandSessionImpl.SessionInternalHandler

public WonderlandSessionImpl.SessionInternalHandler(WonderlandSessionImpl session)
Method Detail

getConnectionType

public ConnectionType getConnectionType()
Description copied from interface: ClientConnection
Get the type this client represents.

Returns:
the type of client

handleMessage

public void handleMessage(Message message)
Description copied from class: BaseConnection
Handle a message sent from the server. This method is called when a message is received that is not a response message.

Specified by:
handleMessage in class BaseConnection
Parameters:
message - the message to handle

waitForInitialization

public SessionInitializationMessage waitForInitialization()
                                                   throws java.lang.InterruptedException
Wait for a session initialization message to be sent to the internal handler. This method will return the most recent initialization message received, or block if no message has been received.

When a client disconnects, the message will be reset to null. Clients waiting at that point will be woken with a null response.

Returns:
the most recent message, or null if the client is disconnected.
Throws:
java.lang.InterruptedException


Open Wonderland - http://openwonderland.org