Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.wire

# Class AsynchronousChannelListenerDispatcher

java.lang.Object
org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher<AsynchronousChannelListener>
org.firebirdsql.gds.ng.wire.AsynchronousChannelListenerDispatcher

All Implemented Interfaces:
  `Iterable<AsynchronousChannelListener>`, `AsynchronousChannelListener`

public class AsynchronousChannelListenerDispatcher extends AbstractListenerDispatcher<AsynchronousChannelListener> implements AsynchronousChannelListener
Dispatcher for `AsynchronousChannelListener`.

Since:
  3.0
Author:
  Mark Rotteveel

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.wire.AsynchronousChannelListener

  `AsynchronousChannelListener.Event`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsynchronousChannelListenerDispatcher()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `channelClosing(FbWireAsynchronousChannel channel)`
  Signals the closing of an asynchronous channel.
  `void`
  `eventReceived(FbWireAsynchronousChannel channel, AsynchronousChannelListener.Event event)`
  Signals that an event has been received.
  `protected void`
  `logError(String message, Throwable throwable)`

  ### Methods inherited from class org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher

  `addListener, addWeakListener, isShutdown, iterator, notify, removeAllListeners, removeListener, shutdown`

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

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

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### AsynchronousChannelListenerDispatcher

    public AsynchronousChannelListenerDispatcher()

- ## Method Details

  - ### channelClosing

    public void channelClosing(FbWireAsynchronousChannel channel)
    Description copied from interface: `AsynchronousChannelListener`
    Signals the closing of an asynchronous channel.

    Fired before the channel is actually closed.

    Specified by:
      `channelClosing` in interface `AsynchronousChannelListener`
    Parameters:
      `channel` - channel that is being closed

  - ### eventReceived

    public void eventReceived(FbWireAsynchronousChannel channel, AsynchronousChannelListener.Event event)
    Description copied from interface: `AsynchronousChannelListener`
    Signals that an event has been received.

    Implementations should take care to only perform short processing on the current thread. If longer or complicated processing is necessary, please offload it to another thread or executor.

    Specified by:
      `eventReceived` in interface `AsynchronousChannelListener`
    Parameters:
      `channel` - channel that received the event
      `event` - event received

  - ### logError

    protected void logError(String message, Throwable throwable)
    Specified by:
      `logError` in class `AbstractListenerDispatcher<AsynchronousChannelListener>`