|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Selectable
An interface for asynchronous, multi-channel network I/O
Method Summary | |
---|---|
void |
close()
Close this selector |
java.util.List<NetworkReceive> |
completedReceives()
The list of receives that completed on the last poll() call. |
java.util.List<NetworkSend> |
completedSends()
The list of sends that completed on the last poll() call. |
void |
connect(int id,
java.net.InetSocketAddress address,
int sendBufferSize,
int receiveBufferSize)
Begin establishing a socket connection to the given address identified by the given address |
java.util.List<java.lang.Integer> |
connected()
The list of connections that completed their connection on the last poll()
call. |
void |
disconnect(int id)
Begin disconnecting the connection identified by the given id |
java.util.List<java.lang.Integer> |
disconnected()
The list of connections that finished disconnecting on the last poll()
call. |
void |
poll(long timeout,
java.util.List<NetworkSend> sends)
Initiate any sends provided, and make progress on any other I/O operations in-flight (connections, disconnections, existing sends, and receives) |
void |
wakeup()
Wakeup this selector if it is blocked on I/O |
Method Detail |
---|
void connect(int id, java.net.InetSocketAddress address, int sendBufferSize, int receiveBufferSize) throws java.io.IOException
id
- The id for this connectionaddress
- The address to connect tosendBufferSize
- The send buffer for the socketreceiveBufferSize
- The receive buffer for the socket
java.io.IOException
- If we cannot begin connectingvoid disconnect(int id)
void wakeup()
void close()
void poll(long timeout, java.util.List<NetworkSend> sends) throws java.io.IOException
timeout
- The amount of time to block if there is nothing to dosends
- The new sends to initiate
java.io.IOException
java.util.List<NetworkSend> completedSends()
poll()
call.
java.util.List<NetworkReceive> completedReceives()
poll()
call.
java.util.List<java.lang.Integer> disconnected()
poll()
call.
java.util.List<java.lang.Integer> connected()
poll()
call.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |