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

## org.jivesoftware.openfire.server
Class OutgoingServerSocketReader

    java.lang.Object
      org.jivesoftware.openfire.server.OutgoingServerSocketReader

    public class OutgoingServerSocketReader

extends Object

An OutgoingServerSocketReader is responsible for reading and queueing the DOM Element sent by a remote server. Since the DOM Elements are received using the outgoing connection only special stanzas may be sent by the remote server (eg. db:result stanzas for answering if the Authoritative Server verified the key sent by this server).

This class is also responsible for closing the outgoing connection if the remote server sent an end of the stream element.

Author:
  Gaston Dombiak

Constructor Summary
`OutgoingServerSocketReader(org.dom4j.io.XMPPPacketReader reader)`

Method Summary
`org.dom4j.Element` | `getElement(long timeout, TimeUnit unit)` Retrieves and removes the first received element that was stored in the queue, waiting if necessary up to the specified wait time if no elements are present on this queue.
`OutgoingServerSession` | `getSession()` Returns the OutgoingServerSession for which this reader is working for or `null` if a OutgoingServerSession was not created yet.
`void` | `setSession(OutgoingServerSession session)` Sets the OutgoingServerSession for which this reader is working for.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OutgoingServerSocketReader

    public OutgoingServerSocketReader(org.dom4j.io.XMPPPacketReader reader)

Method Detail

### getSession

    public OutgoingServerSession getSession()

  Returns the OutgoingServerSession for which this reader is working for or `null` if a OutgoingServerSession was not created yet. While the OutgoingServerSession is being created it is possible to have a reader with no session.

  Returns:
    the OutgoingServerSession for which this reader is working for or `null` if a OutgoingServerSession was not created yet.

### setSession

    public void setSession(OutgoingServerSession session)

  Sets the OutgoingServerSession for which this reader is working for.

  Parameters:
    `session` - the OutgoingServerSession for which this reader is working for

### getElement

    public org.dom4j.Element getElement(long timeout,
                                        TimeUnit unit)
                                 throws InterruptedException

  Retrieves and removes the first received element that was stored in the queue, waiting if necessary up to the specified wait time if no elements are present on this queue.

  Parameters:
    `timeout` - how long to wait before giving up, in units of `unit`.
    `unit` - a `TimeUnit` determining how to interpret the `timeout` parameter.
  Returns:
    the head of this queue, or `null` if the specified waiting time elapses before an element is present.
  Throws:
    `InterruptedException` - if interrupted while waiting.

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

Copyright © 2003-2007 Jive Software.