public interface FbWireAsynchronousChannel
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.
|
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
|
void connect(java.lang.String hostName, int portNumber, int auxHandle) throws java.sql.SQLException
hostName
- HostnameportNumber
- The port numberauxHandle
- Handle identifier for this asynchronous channeljava.sql.SQLException
- For errors connecting, or if the connection is already establishedvoid close() throws java.sql.SQLException
Once closed, the connection can be reestablished using connect(String, int, int)
.
Calling close
on a closed channel is a no-op; no exception should be thrown.
java.sql.SQLException
- For errors closing the channelboolean isConnected()
true
if connected, otherwise false
void addChannelListener(AsynchronousChannelListener listener)
listener
- Listenervoid removeChannelListener(AsynchronousChannelListener listener)
listener
- Listenerjava.nio.channels.SocketChannel getSocketChannel() throws java.sql.SQLException
java.sql.SQLException
- If not currently connectedjava.nio.ByteBuffer getEventBuffer()
void processEventData()
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).
void queueEvent(EventHandle eventHandle) throws java.sql.SQLException
eventHandle
- Event handlejava.sql.SQLException
void cancelEvent(EventHandle eventHandle) throws java.sql.SQLException
eventHandle
- The event handle to canceljava.sql.SQLException
- For errors cancelling the eventCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.