Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.session
Class ConnectionMultiplexerSession

java.lang.Object
  extended by org.jivesoftware.wildfire.session.Session
      extended by org.jivesoftware.wildfire.session.ConnectionMultiplexerSession
All Implemented Interfaces:
ChannelHandler, RoutableChannelHandler

public class ConnectionMultiplexerSession
extends Session

Represents a session between the server and a connection manager.

Each Connection Manager has its own domain. Each connection from the same connection manager uses a different resource. Unlike any other session, connection manager sessions are not present in the routing table. This means that connection managers are not reachable entities. In other words, entities cannot send packets to connection managers but clients being hosted by them. The main reason behind this design decision is that connection managers are private components of the server so they can only be contacted by the server. Connection Manager sessions are present in SessionManager but not in RoutingTable. Use SessionManager.getConnectionMultiplexerSessions(String) to get all sessions or ConnectionMultiplexerManager.getMultiplexerSession(String) to get a random session to a given connection manager.

Author:
Gaston Dombiak

Field Summary
 
Fields inherited from class org.jivesoftware.wildfire.session.Session
authToken, CHARSET, conn, MAJOR_VERSION, MINOR_VERSION, sessionManager, status, STATUS_AUTHENTICATED, STATUS_CLOSED, STATUS_CONNECTED, STATUS_STREAMING
 
Constructor Summary
ConnectionMultiplexerSession(String serverName, Connection connection, StreamID streamID)
           
 
Method Summary
 boolean authenticate(String digest)
          Authenticates the connection manager.
static Session createSession(String serverName, org.xmlpull.v1.XmlPullParser xpp, Connection connection)
           
 String getAvailableStreamFeatures()
          Returns a text with the available stream features.
static Connection.CompressionPolicy getCompressionPolicy()
          Returns whether compression is optional or is disabled for clients.
static Connection.TLSPolicy getTLSPolicy()
          Returns whether TLS is mandatory, optional or is disabled for clients.
static void setCompressionPolicy(Connection.CompressionPolicy policy)
          Sets whether compression is optional or is disabled for clients.
static void setTLSPolicy(Connection.TLSPolicy policy)
          Sets whether TLS is mandatory, optional or is disabled for clients.
 
Methods inherited from class org.jivesoftware.wildfire.session.Session
decodeVersion, getAddress, getConnection, getCreationDate, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getSessionData, getStatus, getStreamID, incrementClientPacketCount, incrementServerPacketCount, process, removeSessionData, setAddress, setSessionData, setStatus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionMultiplexerSession

public ConnectionMultiplexerSession(String serverName,
                                    Connection connection,
                                    StreamID streamID)
Method Detail

createSession

public static Session createSession(String serverName,
                                    org.xmlpull.v1.XmlPullParser xpp,
                                    Connection connection)
                             throws org.xmlpull.v1.XmlPullParserException
Throws:
org.xmlpull.v1.XmlPullParserException

getAvailableStreamFeatures

public String getAvailableStreamFeatures()
Description copied from class: Session
Returns a text with the available stream features. Each subclass may return different values depending whether the session has been authenticated or not.

Specified by:
getAvailableStreamFeatures in class Session
Returns:
a text with the available stream features or null to add nothing.

authenticate

public boolean authenticate(String digest)
Authenticates the connection manager. Shared secret is validated with the one provided by the connection manager. If everything went fine then the session will have a status of "authenticated" and the connection manager will receive the client configuration options.

Parameters:
digest - the digest provided by the connection manager with the handshake stanza.
Returns:
true if the connection manager was sucessfully authenticated.

getTLSPolicy

public static Connection.TLSPolicy getTLSPolicy()
Returns whether TLS is mandatory, optional or is disabled for clients. When TLS is mandatory clients are required to secure their connections or otherwise their connections will be closed. On the other hand, when TLS is disabled clients are not allowed to secure their connections using TLS. Their connections will be closed if they try to secure the connection. in this last case.

Returns:
whether TLS is mandatory, optional or is disabled.

setTLSPolicy

public static void setTLSPolicy(Connection.TLSPolicy policy)
Sets whether TLS is mandatory, optional or is disabled for clients. When TLS is mandatory clients are required to secure their connections or otherwise their connections will be closed. On the other hand, when TLS is disabled clients are not allowed to secure their connections using TLS. Their connections will be closed if they try to secure the connection. in this last case.

Parameters:
policy - whether TLS is mandatory, optional or is disabled.

getCompressionPolicy

public static Connection.CompressionPolicy getCompressionPolicy()
Returns whether compression is optional or is disabled for clients.

Returns:
whether compression is optional or is disabled.

setCompressionPolicy

public static void setCompressionPolicy(Connection.CompressionPolicy policy)
Sets whether compression is optional or is disabled for clients.

Parameters:
policy - whether compression is optional or is disabled.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.