public class V10AsynchronousChannel extends java.lang.Object implements FbWireAsynchronousChannel
| Constructor and Description |
|---|
V10AsynchronousChannel(FbWireDatabase database) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChannelListener(AsynchronousChannelListener listener)
Register a listener for this channel.
|
void |
cancelEvent(EventHandle eventHandle)
Cancels a registered event.
|
void |
close()
Disconnect the asynchronous channel.
|
void |
connect(java.lang.String hostName,
int portNumber,
int auxHandle)
Connects the asynchronous channel to the specified port.
|
protected void |
finalize() |
java.nio.ByteBuffer |
getEventBuffer() |
java.nio.channels.SocketChannel |
getSocketChannel() |
boolean |
isConnected() |
void |
processEventData()
Process the current event data in the buffer.
|
void |
queueEvent(EventHandle eventHandle)
Queues a wait for an event.
|
void |
removeChannelListener(AsynchronousChannelListener listener)
Remove a listener from this channel
|
public V10AsynchronousChannel(FbWireDatabase database)
public void connect(java.lang.String hostName,
int portNumber,
int auxHandle)
throws java.sql.SQLException
FbWireAsynchronousChannelconnect in interface FbWireAsynchronousChannelhostName - HostnameportNumber - The port numberauxHandle - Handle identifier for this asynchronous channeljava.sql.SQLException - For errors connecting, or if the connection is already establishedpublic void close()
throws java.sql.SQLException
FbWireAsynchronousChannel
Once closed, the connection can be reestablished using FbWireAsynchronousChannel.connect(String, int, int).
Calling close on a closed channel is a no-op; no exception should be thrown.
close in interface FbWireAsynchronousChanneljava.sql.SQLException - For errors closing the channelpublic boolean isConnected()
isConnected in interface FbWireAsynchronousChanneltrue if connected, otherwise falsepublic void addChannelListener(AsynchronousChannelListener listener)
FbWireAsynchronousChanneladdChannelListener in interface FbWireAsynchronousChannellistener - Listenerpublic void removeChannelListener(AsynchronousChannelListener listener)
FbWireAsynchronousChannelremoveChannelListener in interface FbWireAsynchronousChannellistener - Listenerpublic java.nio.channels.SocketChannel getSocketChannel()
throws java.sql.SQLException
getSocketChannel in interface FbWireAsynchronousChanneljava.sql.SQLException - If not currently connectedpublic java.nio.ByteBuffer getEventBuffer()
getEventBuffer in interface FbWireAsynchronousChannelpublic void processEventData()
FbWireAsynchronousChannel
This is only to be called by the AsynchronousProcessor. Implementations
should be ready to deal with incomplete data in the event buffer (eg by not processing).
processEventData in interface FbWireAsynchronousChannelpublic void queueEvent(EventHandle eventHandle) throws java.sql.SQLException
FbWireAsynchronousChannelqueueEvent in interface FbWireAsynchronousChanneleventHandle - Event handlejava.sql.SQLExceptionpublic void cancelEvent(EventHandle eventHandle) throws java.sql.SQLException
FbWireAsynchronousChannelcancelEvent in interface FbWireAsynchronousChanneleventHandle - The event handle to canceljava.sql.SQLException - For errors cancelling the eventprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableCopyright © 2001-2022 Jaybird (Firebird JDBC/JCA) team. All rights reserved.