org.jivesoftware.openfire.session
Class LocalComponentSession
java.lang.Object
org.jivesoftware.openfire.session.LocalSession
org.jivesoftware.openfire.session.LocalComponentSession
- All Implemented Interfaces:
- ChannelHandler, RoutableChannelHandler, ComponentSession, Session
public class LocalComponentSession
- extends LocalSession
- implements ComponentSession
Represents a session between the server and a component.
- Author:
- Gaston Dombiak
Methods inherited from class org.jivesoftware.openfire.session.LocalSession |
close, decodeVersion, deliverRawText, getAddress, getConnection, getCreationDate, getHostAddress, getHostName, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getSessionData, getStatus, getStreamID, incrementClientPacketCount, incrementServerPacketCount, isClosed, isSecure, isUsingSelfSignedCertificate, process, removeSessionData, setAddress, setSessionData, setStatus, toString, validate |
Methods inherited from interface org.jivesoftware.openfire.session.Session |
close, deliverRawText, getAddress, getCreationDate, getHostAddress, getHostName, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getStatus, getStreamID, isClosed, isSecure, process, validate |
LocalComponentSession
public LocalComponentSession(String serverName,
Connection conn,
StreamID id)
createSession
public static LocalComponentSession createSession(String serverName,
org.xmlpull.v1.XmlPullParser xpp,
Connection connection)
throws org.xmlpull.v1.XmlPullParserException
- Returns a newly created session between the server and a component. The session will be
created and returned only if all the checkings were correct.
A domain will be binded for the new connecting component. This method is following
the JEP-114 where the domain to bind is sent in the TO attribute of the stream header.
- Parameters:
serverName
- the name of the server where the session is connecting to.xpp
- the parser that is reading the provided XML through the connection.connection
- the connection with the component.
- Returns:
- a newly created session between the server and a component.
- Throws:
org.xmlpull.v1.XmlPullParserException
- if there was an XML error while creating the session.
getAvailableStreamFeatures
public String 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 class LocalSession
- Returns:
- a text with the available stream features or null to add nothing.
getExternalComponent
public ComponentSession.ExternalComponent getExternalComponent()
- Specified by:
getExternalComponent
in interface ComponentSession
authenticate
public boolean authenticate(String digest)
- Authenticate the external component using a digest method. The digest includes the
stream ID and the secret key of the main domain of the external component. A component
needs to authenticate just once but it may bind several domains.
- Parameters:
digest
- the digest sent in the handshake.
- Returns:
- true if the authentication was successful.
Copyright © 2003-2008 Jive Software.