org.jivesoftware.messenger.component
Class ComponentSession
java.lang.Object
org.jivesoftware.messenger.Session
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
Methods inherited from class org.jivesoftware.messenger.Session |
getAddress, getConnection, getCreationDate, getLastActiveDate, getNumClientPackets, getNumServerPackets, getServerName, getStatus, getStreamID, incrementClientPacketCount, incrementServerPacketCount, setAddress, setStatus, toString |
ComponentSession
public ComponentSession(String serverName,
Connection conn,
StreamID id)
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()
Copyright © 1999-2004 Jive Software.