org.jdesktop.wonderland.server.comms
Interface CommunicationsProtocol

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
WonderlandClientCommsProtocol

public interface CommunicationsProtocol
extends java.io.Serializable

A communications protocol describes how a client communicates with the Wonderland server. When the client connects, it request a communications protocol in the first packet it sends. All subsequent packets are handled by the SessionListener that is returned.

Author:
jkaplan

Method Summary
 com.sun.sgs.app.ClientSessionListener createSessionListener(com.sun.sgs.app.ClientSession session, ProtocolVersion version)
          Get the session listener associated with this protocol.
 java.lang.String getName()
          Get the name of this protocol.
 ProtocolVersion getVersion()
          Get the version of this protocol that is supported.
 

Method Detail

getName

java.lang.String getName()
Get the name of this protocol. The protocol name must be unique, and will be requested by clients.

Returns:
the unique name of the protocol

getVersion

ProtocolVersion getVersion()
Get the version of this protocol that is supported. Right now, only a single version of a given protocol is supported, but protocols may be backwards compatible to support clients with older versions.

Returns:
the version of the protocol

createSessionListener

com.sun.sgs.app.ClientSessionListener createSessionListener(com.sun.sgs.app.ClientSession session,
                                                            ProtocolVersion version)
Get the session listener associated with this protocol.

Parameters:
session - the client we are creating a session for
version - the protocol version the client is connecting with
Returns:
the session manager that will be used to handle client sessions from this manager.


Open Wonderland - http://openwonderland.org