Jive Messenger 2.2.2 Javadoc

org.jivesoftware.messenger.component
Class ComponentSession

java.lang.Object
  extended by org.jivesoftware.messenger.Session
      extended by org.jivesoftware.messenger.component.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.messenger.Session
authToken, CHARSET, conn, 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.XPPPacketReader reader, Connection connection)
          Returns a newly created session between the server and a component.
 ComponentSession.ExternalComponent getExternalComponent()
           
 void process(Packet packet)
          Process an XMPP packet.
 
Methods inherited from class org.jivesoftware.messenger.Session
getAddress, getConnection, getCreationDate, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getStatus, getStreamID, incrementClientPacketCount, incrementServerPacketCount, setAddress, 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.XPPPacketReader reader,
                                    Connection 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

process

public void process(Packet packet)
             throws PacketException
Description copied from interface: ChannelHandler
Process an XMPP packet.

Parameters:
packet - a packet to process.
Throws:
PacketException - thrown if the packet is malformed (results in the sender's session being shutdown).

getExternalComponent

public ComponentSession.ExternalComponent getExternalComponent()

Jive Messenger 2.2.2 Javadoc

Copyright © 1999-2004 Jive Software.