Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.server
Class OutgoingSessionPromise

java.lang.Object
  extended by org.jivesoftware.wildfire.server.OutgoingSessionPromise
All Implemented Interfaces:
ChannelHandler, RoutableChannelHandler

public class OutgoingSessionPromise
extends Object
implements RoutableChannelHandler

An OutgoingSessionPromise provides an asynchronic way for sending packets to remote servers. When looking for a route to a remote server that does not have an existing connection, a session promise is returned. This class will queue packets and process them in another thread. The processing thread will use a pool of thread that will actually do the hard work. The threads in the pool will try to connect to remote servers and deliver the packets. If an error occured while establishing the connection or sending the packet an error will be returned to the sender of the packet.

Author:
Gaston Dombiak

Method Summary
 JID getAddress()
          Returns the XMPP address.
static OutgoingSessionPromise getInstance()
           
 void process(Packet packet)
          Process an XMPP packet.
 void shutdown()
          Shuts down the thread that consumes the queued packets and also stops the pool of threads that actually send the packets to the remote servers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OutgoingSessionPromise getInstance()

shutdown

public void shutdown()
Shuts down the thread that consumes the queued packets and also stops the pool of threads that actually send the packets to the remote servers.


getAddress

public JID getAddress()
Description copied from interface: RoutableChannelHandler
Returns the XMPP address. The address is used by services like the core server packet router to determine if a packet should be sent to the handler. Handlers that are working on behalf of the server should use the generic server hostname address (e.g. server.com).

Specified by:
getAddress in interface RoutableChannelHandler
Returns:
the XMPP address.

process

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

Specified by:
process in interface ChannelHandler
Parameters:
packet - a packet to process.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.