Deprecated
This class is deprecated; use conduits instead.
| Modifier and Type | Field and Description |
|---|---|
| protected final W | channel
The wrapped channel. |
| private ChannelListener | |
| private final ChannelListener | |
| private final ChannelListener | |
| private final ChannelListener | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private ChannelListener | |
| private volatile Thread | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private ChannelListener | |
| private volatile Thread | |
| private static final AtomicReferenceFieldUpdater |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public void | awaitReadable()
Implements org. Block until this channel becomes readable again. |
| public void | awaitReadable(final long
the time to wait time, final TimeUnit the time unit timeUnit)Implements org. Block until this channel becomes readable again, or until the timeout expires. |
| public void | awaitWritable()
Implements org. Block until this channel becomes writable again. |
| public void | awaitWritable(final long
the time to wait time, final TimeUnit the time unit timeUnit)Implements org. Block until this channel becomes writable again, or until the timeout expires. |
| private int | |
| private int | |
| protected void | |
| protected void | clearReadRequiresWrite()
Indicate that the channel no longer requires writability for reads to proceed. |
| protected void | |
| protected void | clearWriteRequiresRead()
Indicate that the channel no longer requires writability for writes to proceed. |
| public void | close()
Implements org. Close this channel. |
| protected void | closeAction(final boolean
if reads were previously shut down readShutDown, final boolean if writes were previously shut down writeShutDown)The action to perform when the channel is closed via the |
| public final boolean | Returns: true if the flush completed, or false if the operation would blockImplements org. Perform channel flush. |
| protected boolean | Returns: true if the flush succeeded, false if it would blocktrue if the channel's write side has been shut down, false otherwiseThe action to perform when the channel is flushed. |
| public W | getChannel()
Implements org. Get the channel which is wrapped by this object. |
| public ChannelListener | getCloseListener()
Implements org. Get the close listener. |
| public ChannelListener. | getCloseSetter()
Implements org. Get the setter which can be used to change the close listener for this channel. |
| public XnioIoThread | getIoThread()
Implements org. Get the I/O thread associated with this channel. |
| public <T> T | getOption(final Option<T>
the option to get option)Implements org. Get the value of a channel option. |
| public ChannelListener | getReadListener()
Implements org. Get the read listener. |
| public ChannelListener. | getReadSetter()
Implements org. Get the setter which can be used to change the read listener for this channel. |
| public XnioExecutor | getReadThread()
Implements org.
Deprecated
Get the read thread for this channel. |
| public XnioWorker | getWorker()
Implements org. Get the worker for this channel. |
| public ChannelListener | getWriteListener()
Implements org. Get the write listener. |
| public ChannelListener. | getWriteSetter()
Implements org. Get the setter which can be used to change the write listener for this channel. |
| public XnioExecutor | getWriteThread()
Implements org.
Deprecated
Get the write thread for this channel. |
| protected void | |
| protected void | |
| protected void | |
| public boolean | isOpen()
Implements java. Determine whether this channel is open. |
| public boolean | isReadResumed()
Implements org. Determine whether reads are resumed. |
| protected boolean | Returns: whether the channel is shut down for readsDetermine whether the channel is shut down for reads. |
| protected boolean | |
| public boolean | isWriteResumed()
Implements org. Determine whether writes are resumed. |
| protected boolean | Returns: whether the channel is shut down for writesDetermine whether the channel is shut down for writes. |
| protected boolean | |
| protected void | |
| protected void | |
| public void | resumeReads()
Implements org. Resume reads on this channel. |
| public void | resumeWrites()
Implements org. Resume writes on this channel. |
| protected boolean | Returns: true if the channel has fully closed (for the first time) due to this call, false otherwiseSet both the channel read and write shut down flags. |
| public void | setCloseListener(final ChannelListener<? super C>
the close listener closeListener)Implements org. Set the close listener. |
| private int | |
| public <T> T | setOption(final Option<T>
the option to set option, final T the value of the option to set value)Implements org. Set an option for this channel. |
| public void | setReadListener(final ChannelListener<? super C>
the read listener readListener)Implements org. Set the read listener. |
| protected void | setReadReady()
Indicate that the channel is definitely immediately readable, regardless of the underlying channel state. |
| protected void | setReadRequiresWrite()
Indicate that the channel will not be readable until the write handler is called. |
| protected boolean | Returns: true if the channel has fully closed due to this call, false otherwiseSet the channel read shut down flag. |
| public void | setWriteListener(final ChannelListener<? super C>
the write listener writeListener)Implements org. Set the write listener. |
| protected void | setWriteReady()
Indicate that the channel is definitely immediately writable, regardless of the underlying channel state. |
| protected void | setWriteRequiresRead()
Indicate that the channel will not be writable until the read handler is called. |
| protected boolean | Returns: true if the channel has fully closed due to this call, false otherwiseSet the channel write shut down flag. |
| public void | shutdownReads()
Implements org. Perform the read shutdown action if it hasn't been performed already. |
| protected void | |
| public void | shutdownWrites()
Implements org. Perform the write shutdown action if it hasn't been performed already. |
| protected void | |
| protected void | shutdownWritesComplete(final boolean
true if the read side was already shut down, false otherwiseNotification that the channel has successfully flushed after having shut down writes. |
| public boolean | supportsOption(final Option<?>
the option option)Implements org. Determine whether an option is supported on this channel. |
| public void | suspendReads()
Implements org. Suspend further read notifications on this channel. |
| public void | suspendWrites()
Implements org. Suspend further write notifications on this channel. |
| protected final C | |
| public String | |
| protected boolean | Returns: true if the flag was set, false if too many tasks are already outstandingIndicate that read requires an external task to complete. |
| protected boolean | Returns: true if the flag was set, false if too many tasks are already outstandingIndicate that write requires an external task to complete. |
| private void | |
| private void | |
| public void | wakeupReads()
Implements org.
|
| public void | wakeupWrites()
Implements org.
|
| protected boolean |
| channel | back to summary |
|---|---|
| protected final W channel The wrapped channel. | |
| closeListener | back to summary |
|---|---|
| private ChannelListener<? super C> closeListener | |
| delegateCloseListener | back to summary |
|---|---|
| private final ChannelListener<Channel> delegateCloseListener | |
| delegateReadListener | back to summary |
|---|---|
| private final ChannelListener<Channel> delegateReadListener | |
| delegateWriteListener | back to summary |
|---|---|
| private final ChannelListener<Channel> delegateWriteListener | |
| READ_FLAGS | back to summary |
|---|---|
private static final int READ_FLAGS
| |
| READ_READY | back to summary |
|---|---|
| private static final int READ_READY | |
| READ_REQUESTED | back to summary |
|---|---|
| private static final int READ_REQUESTED | |
| READ_REQUIRES_EXT | back to summary |
|---|---|
| private static final int READ_REQUIRES_EXT | |
| READ_REQUIRES_WRITE | back to summary |
|---|---|
| private static final int READ_REQUIRES_WRITE | |
| READ_SHUT_DOWN | back to summary |
|---|---|
| private static final int READ_SHUT_DOWN | |
| READ_SINGLE_EXT | back to summary |
|---|---|
| private static final int READ_SINGLE_EXT | |
| readListener | back to summary |
|---|---|
| private ChannelListener<? super C> readListener | |
| readWaiter | back to summary |
|---|---|
private volatile Thread readWaiter
| |
| readWaiterUpdater | back to summary |
|---|---|
private static final AtomicReferenceFieldUpdater<TranslatingSuspendableChannel<C extends SuspendableChannel, W extends SuspendableChannel>, Thread> readWaiterUpdater
| |
| state | back to summary |
|---|---|
private volatile int state
| |
| stateUpdater | back to summary |
|---|---|
private static final AtomicIntegerFieldUpdater<TranslatingSuspendableChannel<C extends SuspendableChannel, W extends SuspendableChannel>> stateUpdater
| |
| WRITE_COMPLETE | back to summary |
|---|---|
| private static final int WRITE_COMPLETE | |
| WRITE_FLAGS | back to summary |
|---|---|
private static final int WRITE_FLAGS
| |
| WRITE_READY | back to summary |
|---|---|
| private static final int WRITE_READY | |
| WRITE_REQUESTED | back to summary |
|---|---|
| private static final int WRITE_REQUESTED | |
| WRITE_REQUIRES_EXT | back to summary |
|---|---|
| private static final int WRITE_REQUIRES_EXT | |
| WRITE_REQUIRES_READ | back to summary |
|---|---|
| private static final int WRITE_REQUIRES_READ | |
| WRITE_SHUT_DOWN | back to summary |
|---|---|
| private static final int WRITE_SHUT_DOWN | |
| WRITE_SINGLE_EXT | back to summary |
|---|---|
| private static final int WRITE_SINGLE_EXT | |
| writeListener | back to summary |
|---|---|
| private ChannelListener<? super C> writeListener | |
| writeWaiter | back to summary |
|---|---|
private volatile Thread writeWaiter
| |
| writeWaiterUpdater | back to summary |
|---|---|
private static final AtomicReferenceFieldUpdater<TranslatingSuspendableChannel<C extends SuspendableChannel, W extends SuspendableChannel>, Thread> writeWaiterUpdater
| |
| TranslatingSuspendableChannel | back to summary |
|---|---|
| protected TranslatingSuspendableChannel(final W channel) Construct a new instance.
| |
| addFlag | back to summary |
|---|---|
| private int addFlag(final int mask, final int count) | |
| awaitReadable | back to summary |
|---|---|
| public void awaitReadable() throws IOException Implements org. Doc from org. Block until this channel becomes readable again. This method may return spuriously before the channel becomes readable.
| |
| awaitReadable | back to summary |
|---|---|
| public void awaitReadable(final long time, final TimeUnit timeUnit) throws IOException Implements org. Doc from org. Block until this channel becomes readable again, or until the timeout expires. This method may return spuriously before the channel becomes readable or the timeout expires.
| |
| awaitWritable | back to summary |
|---|---|
| public void awaitWritable() throws IOException Implements org. Doc from org. Block until this channel becomes writable again. This method may return spuriously before the channel becomes writable.
| |
| awaitWritable | back to summary |
|---|---|
| public void awaitWritable(final long time, final TimeUnit timeUnit) throws IOException Implements org. Doc from org. Block until this channel becomes writable again, or until the timeout expires. This method may return spuriously before the channel becomes writable or the timeout expires.
| |
| clearFlag | back to summary |
|---|---|
| private int clearFlag(final int count) | |
| clearFlags | back to summary |
|---|---|
| private int clearFlags(int flags) | |
| clearReadReady | back to summary |
|---|---|
| protected void clearReadReady() Indicate that the channel is no longer definitely immediately readable. | |
| clearReadRequiresWrite | back to summary |
|---|---|
| protected void clearReadRequiresWrite() Indicate that the channel no longer requires writability for reads to proceed. | |
| clearWriteReady | back to summary |
|---|---|
| protected void clearWriteReady() Indicate that the channel is no longer definitely immediately writable. | |
| clearWriteRequiresRead | back to summary |
|---|---|
| protected void clearWriteRequiresRead() Indicate that the channel no longer requires writability for writes to proceed. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements org. Close this channel. This method is idempotent.
| |
| closeAction | back to summary |
|---|---|
| protected void closeAction(final boolean readShutDown, final boolean writeShutDown) throws IOException The action to perform when the channel is closed via the
| |
| flush | back to summary |
|---|---|
| public final boolean flush() throws IOException Implements org. Perform channel flush. To change the action taken to flush, subclasses should override
| |
| flushAction | back to summary |
|---|---|
| protected boolean flushAction(final boolean shutDown) throws IOException The action to perform when the channel is flushed. By default, this method delegates to the underlying channel.
If the
| |
| getChannel | back to summary |
|---|---|
| public W getChannel() Implements org. Doc from org. Get the channel which is wrapped by this object.
| |
| getCloseListener | back to summary |
|---|---|
| public ChannelListener Implements org. Doc from org. Get the close listener.
| |
| getCloseSetter | back to summary |
|---|---|
| public ChannelListener. Implements org. Doc from org. Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.
| |
| getIoThread | back to summary |
|---|---|
| public XnioIoThread getIoThread() Implements org. Doc from org. Get the I/O thread associated with this channel.
| |
| getOption | back to summary |
|---|---|
| public <T> T getOption(final Option<T> option) throws IOException Implements org. Doc from org. Get the value of a channel option.
| |
| getReadListener | back to summary |
|---|---|
| public ChannelListener Implements org. Doc from org. Get the read listener.
| |
| getReadSetter | back to summary |
|---|---|
| public ChannelListener. Implements org. Doc from org. Get the setter which can be used to change the read listener for this channel.
| |
| getReadThread | back to summary |
|---|---|
| public XnioExecutor getReadThread() Implements org. Doc from org. Deprecated
Get the read thread for this channel.
| |
| getWorker | back to summary |
|---|---|
| public XnioWorker getWorker() Implements org. Doc from org. Get the worker for this channel.
| |
| getWriteListener | back to summary |
|---|---|
| public ChannelListener Implements org. Doc from org. Get the write listener.
| |
| getWriteSetter | back to summary |
|---|---|
| public ChannelListener. Implements org. Doc from org. Get the setter which can be used to change the write listener for this channel.
| |
| getWriteThread | back to summary |
|---|---|
| public XnioExecutor getWriteThread() Implements org. Doc from org. Deprecated
Get the write thread for this channel.
| |
| handleClosed | back to summary |
|---|---|
| protected void handleClosed() Called when the underlying channel is closed. | |
| handleReadable | back to summary |
|---|---|
| protected void handleReadable() Called when the underlying channel is readable. | |
| handleWritable | back to summary |
|---|---|
| protected void handleWritable() Called when the underlying channel is writable. | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Doc from org. Determine whether this channel is open. This method will return
| |
| isReadResumed | back to summary |
|---|---|
| public boolean isReadResumed() Implements org. Doc from org. Determine whether reads are resumed.
| |
| isReadShutDown | back to summary |
|---|---|
| protected boolean isReadShutDown() Determine whether the channel is shut down for reads.
| |
| isWriteComplete | back to summary |
|---|---|
| protected boolean isWriteComplete() | |
| isWriteResumed | back to summary |
|---|---|
| public boolean isWriteResumed() Implements org. Doc from org. Determine whether writes are resumed.
| |
| isWriteShutDown | back to summary |
|---|---|
| protected boolean isWriteShutDown() Determine whether the channel is shut down for writes.
| |
| readRequiresWrite | back to summary |
|---|---|
| protected boolean readRequiresWrite() Indicate if the channel is not readable until the write handler is called. | |
| removeReadRequiresExternal | back to summary |
|---|---|
| protected void removeReadRequiresExternal() Indicate that one external read task was completed. This method should be called once for every time
that | |
| removeWriteRequiresExternal | back to summary |
|---|---|
| protected void removeWriteRequiresExternal() Indicate that one external write task was completed. This method should be called once for every time
that | |
| resumeReads | back to summary |
|---|---|
| public void resumeReads() Implements org. Doc from org. Resume reads on this channel. The read listener will be called as soon as there is data available to be read. | |
| resumeWrites | back to summary |
|---|---|
| public void resumeWrites() Implements org. Doc from org. Resume writes on this channel. The write listener will be called as soon as the channel becomes writable. | |
| setClosed | back to summary |
|---|---|
| protected boolean setClosed() Set both the channel read and write shut down flags.
| |
| setCloseListener | back to summary |
|---|---|
| public void setCloseListener(final ChannelListener<? super C> closeListener) Implements org. Doc from org. Set the close listener.
| |
| setFlags | back to summary |
|---|---|
| private int setFlags(int flags) | |
| setOption | back to summary |
|---|---|
| public <T> T setOption(final Option<T> option, final T value) throws IllegalArgumentException, IOException Implements org. Doc from org. Set an option for this channel. Unsupported options are ignored.
| |
| setReadListener | back to summary |
|---|---|
| public void setReadListener(final ChannelListener<? super C> readListener) Implements org. Doc from org. Set the read listener.
| |
| setReadReady | back to summary |
|---|---|
| protected void setReadReady() Indicate that the channel is definitely immediately readable, regardless of the underlying channel state. | |
| setReadRequiresWrite | back to summary |
|---|---|
| protected void setReadRequiresWrite() Indicate that the channel will not be readable until the write handler is called. | |
| setReadShutDown | back to summary |
|---|---|
| protected boolean setReadShutDown() Set the channel read shut down flag.
| |
| setWriteListener | back to summary |
|---|---|
| public void setWriteListener(final ChannelListener<? super C> writeListener) Implements org. Doc from org. Set the write listener.
| |
| setWriteReady | back to summary |
|---|---|
| protected void setWriteReady() Indicate that the channel is definitely immediately writable, regardless of the underlying channel state. | |
| setWriteRequiresRead | back to summary |
|---|---|
| protected void setWriteRequiresRead() Indicate that the channel will not be writable until the read handler is called. | |
| setWriteShutDown | back to summary |
|---|---|
| protected boolean setWriteShutDown() Set the channel write shut down flag.
| |
| shutdownReads | back to summary |
|---|---|
| public void shutdownReads() throws IOException Implements org. Perform the read shutdown action if it hasn't been performed already.
| |
| shutdownReadsAction | back to summary |
|---|---|
| protected void shutdownReadsAction(final boolean writeComplete) throws IOException The action to perform when reads are shut down. By default, this method delegates to the underlying channel.
| |
| shutdownWrites | back to summary |
|---|---|
| public void shutdownWrites() throws IOException Implements org. Perform the write shutdown action if it hasn't been performed already.
| |
| shutdownWritesAction | back to summary |
|---|---|
| protected void shutdownWritesAction() throws IOException The action to perform when writes are requested to be shut down. By default, this method delegates to the underlying channel.
| |
| shutdownWritesComplete | back to summary |
|---|---|
| protected void shutdownWritesComplete(final boolean readShutDown) throws IOException Notification that the channel has successfully flushed after having shut down writes. The underlying channel may not yet be fully flushed at this time.
| |
| supportsOption | back to summary |
|---|---|
| public boolean supportsOption(final Option<?> option) Implements org. Doc from org. Determine whether an option is supported on this channel.
| |
| suspendReads | back to summary |
|---|---|
| public void suspendReads() Implements org. Doc from org. Suspend further read notifications on this channel. | |
| suspendWrites | back to summary |
|---|---|
| public void suspendWrites() Implements org. Doc from org. Suspend further write notifications on this channel. | |
| thisTyped | back to summary |
|---|---|
| protected final C thisTyped() Get this channel, cast to the implemented channel type.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| tryAddReadRequiresExternal | back to summary |
|---|---|
| protected boolean tryAddReadRequiresExternal() Indicate that read requires an external task to complete.
| |
| tryAddWriteRequiresExternal | back to summary |
|---|---|
| protected boolean tryAddWriteRequiresExternal() Indicate that write requires an external task to complete.
| |
| unparkReadWaiters | back to summary |
|---|---|
| private void unparkReadWaiters() | |
| unparkWriteWaiters | back to summary |
|---|---|
| private void unparkWriteWaiters() | |
| wakeupReads | back to summary |
|---|---|
| public void wakeupReads() Implements org. Doc from org.
| |
| wakeupWrites | back to summary |
|---|---|
| public void wakeupWrites() Implements org. Doc from org.
| |
| writeRequiresRead | back to summary |
|---|---|
| protected boolean writeRequiresRead() Indicate if the channel is not writable until the read handler is called. | |