Package org.firebirdsql.gds.ng.wire
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
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.wire.AsynchronousChannelListenerAsynchronousChannelListener.Event
 
- 
 - 
Constructor SummaryConstructors Constructor Description WireEventHandle(java.lang.String eventName, EventHandler eventHandler, Encoding encoding)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intassignNewLocalId()Generates a new local id for this event.voidcalculateCount()voidchannelClosing(FbWireAsynchronousChannel channel)Signals the closing of an asynchronous channel.voideventReceived(FbWireAsynchronousChannel channel, AsynchronousChannelListener.Event event)Signals that an event has been received.intgetEventId()Get the internal event id number for this handleintgetLocalId()voidsetEventId(int eventId)byte[]toByteArray()java.lang.StringtoString()- 
Methods inherited from class org.firebirdsql.gds.ng.AbstractEventHandlegetEventCount, getEventName, onEventOccurred, setEventCount
 
- 
 
- 
- 
- 
Constructor Detail- 
WireEventHandlepublic WireEventHandle(java.lang.String eventName, EventHandler eventHandler, Encoding encoding)
 
- 
 - 
Method Detail- 
calculateCountpublic void calculateCount() 
 - 
setEventIdpublic void setEventId(int eventId) - Parameters:
- eventId- The server side id of this event
 
 - 
getEventIdpublic int getEventId() Description copied from interface:EventHandleGet the internal event id number for this handle- Specified by:
- getEventIdin interface- EventHandle
- Returns:
- The internal event id
 
 - 
assignNewLocalIdpublic int assignNewLocalId() Generates a new local id for this event.
 - 
getLocalIdpublic int getLocalId() - Returns:
- The current local id of this event.
 
 - 
toByteArraypublic byte[] toByteArray() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
channelClosingpublic void channelClosing(FbWireAsynchronousChannel channel) Description copied from interface:AsynchronousChannelListenerSignals the closing of an asynchronous channel.Fired before the channel is actually closed. - Specified by:
- channelClosingin interface- AsynchronousChannelListener
- Parameters:
- channel- The channel that is being closed
 
 - 
eventReceivedpublic void eventReceived(FbWireAsynchronousChannel channel, AsynchronousChannelListener.Event event) Description copied from interface:AsynchronousChannelListenerSignals 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:
- eventReceivedin interface- AsynchronousChannelListener
- Parameters:
- channel- The channel that received the event
- event- The event received
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-