|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.SelectableChannel
public abstract class SelectableChannel
| Constructor Summary | |
|---|---|
protected |
SelectableChannel()
Initializes the channel. |
| Method Summary | |
|---|---|
abstract Object |
blockingLock()
Returns the lock of this channel. |
abstract SelectableChannel |
configureBlocking(boolean block)
Adjusts this channel's blocking mode. |
abstract boolean |
isBlocking()
Tells whether this channel is blocking or not. |
abstract boolean |
isRegistered()
Tells whether or not this channel is currently registered with any selectors. |
abstract SelectionKey |
keyFor(Selector sel)
Retrieves the key representing the channel's registration with the given selector. |
abstract SelectorProvider |
provider()
Returns the provider that created this channel. |
SelectionKey |
register(Selector sel,
int ops)
Registers this channel with the given selector, returning a selection key. |
abstract SelectionKey |
register(Selector sel,
int ops,
Object att)
Registers this channel with the given selector, returning a selection key. |
abstract int |
validOps()
Returns a set of valid operations on this channel. |
| Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel |
|---|
begin, close, end, implCloseChannel, isOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SelectableChannel()
| Method Detail |
|---|
public abstract Object blockingLock()
public abstract SelectableChannel configureBlocking(boolean block)
throws IOException
ClosedChannelException - If this channel is closed.
IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.
IOException - If an error occurs.public abstract boolean isBlocking()
public abstract boolean isRegistered()
public abstract SelectionKey keyFor(Selector sel)
public abstract SelectorProvider provider()
public final SelectionKey register(Selector sel,
int ops)
throws ClosedChannelException
CancelledKeyException - If this channel is currently registered
with the given selector but the corresponding key has already been cancelled
ClosedChannelException - If this channel is closed.
IllegalArgumentException - If a bit in ops does not correspond
to an operation that is supported by this channel, that is, if
set & ~validOps() != 0.
IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.
IllegalSelectorException - If this channel was not created by
the same provider as the given selector.
public abstract SelectionKey register(Selector sel,
int ops,
Object att)
throws ClosedChannelException
CancelledKeyException - If this channel is currently registered
with the given selector but the corresponding key has already been
cancelled.
ClosedChannelException - If this channel is closed.
IllegalArgumentException - If a bit in ops does not correspond
to an operation that is supported by this channel, that is, if
set & ~validOps() != 0.
IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.
IllegalSelectorException - If this channel was not created by
the same provider as the given selector.public abstract int validOps()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||