Package tigase.server.xmppclient

# Class StreamManagementIOProcessor.OutQueue

java.lang.Object
tigase.server.xmppclient.StreamManagementIOProcessor.Counter
tigase.server.xmppclient.StreamManagementIOProcessor.OutQueue

Enclosing class:
  StreamManagementIOProcessor

public static class StreamManagementIOProcessor.OutQueue extends StreamManagementIOProcessor.Counter
OutQueue class implements queue of outgoing packets waiting for ack with implementation of removing acked elements when id of acked packet is passed

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `StreamManagementIOProcessor.OutQueue.Entry`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OutQueue()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `ack(int value)`
  Confirm delivery of packets up to count passed as value
  `boolean`
  `append(Packet packet, int timeoutInSec)`
  Deprecated.
  `boolean`
  `append(Packet packet, int maxQueueSize, int timeoutInSec)`
  Append packet to waiting for ack queue
  `protected long`
  `getLastConfirmationAt()`
  Method returns timestamp of the last received ack.
  `protected long`
  `getLastRequestSentAt()`
  Method returns timestamp of the last request for ack being sent.
  `protected ArrayDeque<StreamManagementIOProcessor.OutQueue.Entry>`
  `getQueue()`
  Method returns internal queue with packets waiting for ack - use testing only!
  `protected boolean`
  `gotAckOrSentRequestSince(long since)`
  Method checks if any ack was received or request for ack was sent since passed timestamp.
  `void`
  `sendingRequest()`
  Method notifies class that request for ack is being sent
  `void`
  `setAckRequestCount(int ackRequestCount)`
  Sets ack request count value
  `void`
  `setResumptionEnabled(boolean enabled)`
  Deprecated.
  `protected int`
  `unackedSinceLastRequest()`
  Method returns no. of unacked stanzas since last request for ack was sent.
  `int`
  `waitingForAck()`
  Returns size of queue containing packets waiting for ack

  ### Methods inherited from class tigase.server.xmppclient.StreamManagementIOProcessor.Counter

  `get, inc, setCounter`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### OutQueue

    public OutQueue()

- ## Method Details

  - ### append

    @Deprecated public boolean append(Packet packet, int timeoutInSec)
    Deprecated.
    Append packet to waiting for ack queue

  - ### append

    public boolean append(Packet packet, int maxQueueSize, int timeoutInSec)
    Append packet to waiting for ack queue

  - ### ack

    public void ack(int value)
    Confirm delivery of packets up to count passed as value

  - ### sendingRequest

    public void sendingRequest()
    Method notifies class that request for ack is being sent

  - ### setAckRequestCount

    public void setAckRequestCount(int ackRequestCount)
    Sets ack request count value
    Parameters:
      `ackRequestCount` -

  - ### setResumptionEnabled

    @Deprecated public void setResumptionEnabled(boolean enabled)
    Deprecated.

  - ### waitingForAck

    public int waitingForAck()
    Returns size of queue containing packets waiting for ack

  - ### getQueue

    protected ArrayDeque<StreamManagementIOProcessor.OutQueue.Entry> getQueue()
    Method returns internal queue with packets waiting for ack - use testing only!

  - ### getLastConfirmationAt

    protected long getLastConfirmationAt()
    Method returns timestamp of the last received ack.
    Returns:

  - ### getLastRequestSentAt

    protected long getLastRequestSentAt()
    Method returns timestamp of the last request for ack being sent.
    Returns:

  - ### gotAckOrSentRequestSince

    protected boolean gotAckOrSentRequestSince(long since)
    Method checks if any ack was received or request for ack was sent since passed timestamp.
    Parameters:
      `since` -
    Returns:

  - ### unackedSinceLastRequest

    protected int unackedSinceLastRequest()
    Method returns no. of unacked stanzas since last request for ack was sent.
    Returns: