Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.server
Class OutgoingSessionPromise

    java.lang.Object
      org.jivesoftware.openfire.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 occurred while establishing the connection or sending the packet an error will be returned to the sender of the packet.

Author:
  Gaston Dombiak

Method Summary
`org.xmpp.packet.JID` | `getAddress()` Returns the XMPP address.
`static OutgoingSessionPromise` | `getInstance()`
`void` | `process(org.xmpp.packet.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 org.xmpp.packet.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(org.xmpp.packet.Packet packet)

  Description copied from interface: `ChannelHandler`
  Process an XMPP packet.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.