java.lang.Object
net.i2p.client.impl.I2PSessionImpl.AvailabilityNotifier
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
I2PSessionMuxedImpl.MuxedAvailabilityNotifier
Enclosing class:
I2PSessionImpl

protected class I2PSessionImpl.AvailabilityNotifierextends Object implements Runnable
This notifies the client of payload messages. Needs work.
  • Field Details

    • _pendingIds

      private final List<Long> _pendingIds
      Message ids waiting for a send slot.
    • _pendingSizes

      private final List<Integer> _pendingSizes
      Sizes of the messages waiting for a send slot.
    • _alive

      private volatile boolean _alive
      Whether the sender thread should keep running.
  • Constructor Details

    • AvailabilityNotifier

      public AvailabilityNotifier()
      Creates the notifier with its pending queues empty; ids and sizes are queued by available(long, int) and drained by the run loop.
  • Method Details

    • stopNotifying

      public void stopNotifying()
      Stop notifying.
    • available

      public void available(long msgId, int size)
      Notify that a message is available.
      Parameters:
      msgId - the message ID
      size - the unencrypted payload length in bytes
    • run

      public void run()
      Specified by:
      run in interface Runnable