Class WireEventHandle

java.lang.Object
org.firebirdsql.gds.ng.AbstractEventHandle
org.firebirdsql.gds.ng.wire.WireEventHandle
All Implemented Interfaces:
EventHandle, AsynchronousChannelListener

public final class WireEventHandle extends AbstractEventHandle implements AsynchronousChannelListener
Event handle for the wire protocol.
Since:
3.0
Author:
Mark Rotteveel
  • Constructor Details

  • Method Details

    • calculateCount

      public void calculateCount()
    • setEventId

      public void setEventId(int eventId)
      Parameters:
      eventId - The server side id of this event
    • getEventId

      public int getEventId()
      Description copied from interface: EventHandle
      Get the internal event id number for this handle
      Specified by:
      getEventId in interface EventHandle
      Returns:
      The internal event id
    • assignNewLocalId

      public int assignNewLocalId()
      Generates a new local id for this event.
    • getLocalId

      public int getLocalId()
      Returns:
      The current local id of this event.
    • toByteArray

      public byte[] toByteArray() throws IOException
      Throws:
      IOException
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object