Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.session
Class ComponentSession

java.lang.Object
  extended by org.jivesoftware.wildfire.session.Session
      extended by 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

Nested Class Summary
 class ComponentSession.ExternalComponent
          The ExternalComponent acts as a proxy of the remote connected component.
 
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
ComponentSession(String serverName, Connection conn, StreamID id)
           
 
Method Summary
static Session createSession(String serverName, org.dom4j.io.XMPPPacketReader reader, SocketConnection connection)
          Returns a newly created session between the server and a component.
 String getAvailableStreamFeatures()
          Returns a text with the available stream features.
 ComponentSession.ExternalComponent getExternalComponent()
           
 
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

ComponentSession

public ComponentSession(String serverName,
                        Connection conn,
                        StreamID id)
Method Detail

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()

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.