org.jivesoftware.wildfire.session
Class ComponentSession
java.lang.Object
org.jivesoftware.wildfire.session.Session
org.jivesoftware.wildfire.session.ComponentSession
- All Implemented Interfaces:
- ChannelHandler, RoutableChannelHandler
public class ComponentSession
- extends Session
Represents a session between the server and a component.
- Author:
- Gaston Dombiak
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 |
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 |
ComponentSession
public ComponentSession(String serverName,
Connection conn,
StreamID id)
createSession
public static Session createSession(String serverName,
org.dom4j.io.XMPPPacketReader reader,
SocketConnection connection)
throws UnauthorizedException,
IOException,
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.reader
- the reader 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:
UnauthorizedException
IOException
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.
getExternalComponent
public ComponentSession.ExternalComponent getExternalComponent()
Copyright © 2003-2007 Jive Software.