channels.
Unless otherwise specified, passing a null argument to any of the
methods defined here will cause a NullPointerException to be thrown.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static interface | Channels.
An object used to coordinate the closing of a selectable channel created
by |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SelectableChannel | Returns: The selectable channelThe file descriptor fd, Channels.The object to close the channel closerCreates a selectable channel to a file descriptor that supports an
|
| Channels | back to summary |
|---|---|
| private Channels() | |
| readWriteSelectableChannel | back to summary |
|---|---|
| public static SelectableChannel readWriteSelectableChannel(FileDescriptor fd, Channels. Creates a selectable channel to a file descriptor that supports an
The given file descriptor is a socket or resource that can be
multiplexed by a Implementation Note This method throws
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Channels. | |
| private final FileDescriptor | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | ReadWriteChannelImpl(SelectorProviderImpl provider, FileDescriptor fd, Channels.
|
| Modifier and Type | Method and Description |
|---|---|
| public FileDescriptor | |
| public int | |
| protected void | implCloseSelectableChannel()
Implements abstract java. Closes this selectable channel. |
| protected void | implConfigureBlocking(boolean block)
Implements abstract java. Adjusts this channel's blocking mode. |
| public void | |
| public boolean | translateAndSetReadyOps(int ops, SelectionKeyImpl ski)
Implements sun. Sets the specified ops if present in interestOps. |
| public boolean | translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski)
Implements sun. Adds the specified ops if present in interestOps. |
| public int | translateInterestOps(int ops)
Implements sun. Translates an interest operation set into a native event set |
| private boolean | |
| public int | validOps()
Implements abstract java. Returns an operation set identifying this channel's supported operations. |
| closer | back to summary |
|---|---|
| private final Channels. | |
| fd | back to summary |
|---|---|
| private final FileDescriptor fd | |
| fdVal | back to summary |
|---|---|
| private final int fdVal | |
| ReadWriteChannelImpl | back to summary |
|---|---|
| pack-priv ReadWriteChannelImpl(SelectorProviderImpl provider, FileDescriptor fd, Channels. | |
| getFD | back to summary |
|---|---|
| public FileDescriptor getFD() Implements sun.
| |
| getFDVal | back to summary |
|---|---|
| public int getFDVal() Implements sun.
| |
| implCloseSelectableChannel | back to summary |
|---|---|
| protected void implCloseSelectableChannel() throws IOException Implements abstract java. Doc from java. Closes this selectable channel. This method is invoked by the An implementation of this method must arrange for any other thread that is blocked in an I/O operation upon this channel to return immediately, either by throwing an exception or by returning normally.
| |
| implConfigureBlocking | back to summary |
|---|---|
| protected void implConfigureBlocking(boolean block) throws IOException Implements abstract java. Doc from java. Adjusts this channel's blocking mode. This method is invoked by the
| |
| kill | back to summary |
|---|---|
| public void kill() throws IOException Implements sun.
| |
| translateAndSetReadyOps | back to summary |
|---|---|
| public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) Implements sun. Doc from sun. Sets the specified ops if present in interestOps. The specified ops are turned on, and all other ops are turned off.
| |
| translateAndUpdateReadyOps | back to summary |
|---|---|
| public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) Implements sun. Doc from sun. Adds the specified ops if present in interestOps. The specified ops are turned on without affecting the other ops.
| |
| translateInterestOps | back to summary |
|---|---|
| public int translateInterestOps(int ops) Implements sun. Doc from sun. Translates an interest operation set into a native event set
| |
| translateReadyOps | back to summary |
|---|---|
| private boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) | |
| validOps | back to summary |
|---|---|
| public int validOps() Implements abstract java. Doc from java. Returns an operation set identifying this channel's supported operations. The bits that are set in this integer value denote exactly the operations that are valid for this channel. This method always returns the same value for a given concrete channel class.
| |
readWriteSelectableChannel.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | implReleaseChannel(SelectableChannel
The closed selectable channel sc)Release the file descriptor and any resources for a selectable
channel that closed while registered with one or more |
| implCloseChannel | back to summary |
|---|---|
| public void implCloseChannel(SelectableChannel sc) throws IOException Closes a selectable channel. This method is invoked by the channel's close method in order to perform the actual work of closing the channel. This method is only invoked if the channel has not yet been closed, and it is never invoked more than once by the channel's close implementation. An implementation of this method must arrange for any other
thread that is blocked in an I/O operation upon the channel to return
immediately, either by throwing an exception or by returning normally.
If the channel is
| |
| implReleaseChannel | back to summary |
|---|---|
| public void implReleaseChannel(SelectableChannel sc) throws IOException Release the file descriptor and any resources for a selectable
channel that closed while registered with one or more This method is for cases where a channel is closed when
API Note This method is invoked while synchronized on the selector and its selected-key set. Great care must be taken to avoid deadlocks with other threads that also synchronize on these objects.
| |