Class LocalConnectionMultiplexerSession
- All Implemented Interfaces:
ChannelHandler<org.xmpp.packet.Packet>
,RoutableChannelHandler
,ConnectionMultiplexerSession
,Session
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jivesoftware.openfire.session.Session
Session.Status
-
Field Summary
Fields inherited from class org.jivesoftware.openfire.session.LocalSession
address, conn, serverName, sessionManager, startDate, status, streamID, streamManager
Fields inherited from interface org.jivesoftware.openfire.session.Session
MAJOR_VERSION, MINOR_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionLocalConnectionMultiplexerSession
(String serverName, Connection connection, StreamID streamID) -
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate
(String digest) Authenticates the connection manager.createSession
(String serverName, org.xmlpull.v1.XmlPullParser xpp, Connection connection) List<org.dom4j.Element>
Returns a text with the available stream features.Returns the connection associated with this Session.void
reattach
(LocalSession connectionProvider, long h) Reattach the (existing) session to the connection provided by a new session (a session that will be replaced by the older, pre-existing session).void
Set the session to detached mode, indicating that the underlying connection has been closed.toString()
Methods inherited from class org.jivesoftware.openfire.session.LocalSession
close, deliverRawText, getAddress, getCipherSuiteName, getCreationDate, getHostAddress, getHostName, getLanguage, getLastActiveDate, getNumClientPackets, getNumServerPackets, getPeerCertificates, getServerName, getSessionData, getSoftwareVersion, getStatus, getStreamID, getStreamManager, getTLSProtocolName, incrementClientPacketCount, incrementServerPacketCount, isClosed, isDetached, isEncrypted, isUsingSelfSignedCertificate, process, removeSessionData, setAddress, setSessionData, setSoftwareVersionData, setStatus, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jivesoftware.openfire.session.Session
close, deliverRawText, getAddress, getCipherSuiteName, getCreationDate, getHostAddress, getHostName, getLanguage, getLastActiveDate, getNumClientPackets, getNumServerPackets, getPeerCertificates, getServerName, getSoftwareVersion, getStatus, getStreamID, getTLSProtocolName, isAuthenticated, isClosed, isDetached, isEncrypted, process, validate
-
Constructor Details
-
LocalConnectionMultiplexerSession
public LocalConnectionMultiplexerSession(String serverName, Connection connection, StreamID streamID)
-
-
Method Details
-
createSession
public static LocalConnectionMultiplexerSession createSession(String serverName, org.xmlpull.v1.XmlPullParser xpp, Connection connection) throws org.xmlpull.v1.XmlPullParserException - Throws:
org.xmlpull.v1.XmlPullParserException
-
getAvailableStreamFeatures
Description copied from class:LocalSession
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 classLocalSession
- Returns:
- a text with the available stream features or
null
to add nothing.
-
setDetached
public void setDetached()Description copied from class:LocalSession
Set the session to detached mode, indicating that the underlying connection has been closed.- Overrides:
setDetached
in classLocalSession
-
reattach
Description copied from class:LocalSession
Reattach the (existing) session to the connection provided by a new session (a session that will be replaced by the older, pre-existing session). The connection must already be initialized as a running XML Stream, normally by having run through XEP-0198 resumption.- Overrides:
reattach
in classLocalSession
- Parameters:
connectionProvider
- Session from which to obtain the connection from.h
- the sequence number of the last handled stanza sent over the former stream
-
getConnection
Returns the connection associated with this Session.- Overrides:
getConnection
in classLocalSession
- Returns:
- The connection for this session
-
authenticate
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.
-
toString
- Overrides:
toString
in classLocalSession
-