public class AssembledChannel extends java.lang.Object implements CloseableChannel
EMPTY
Constructor and Description |
---|
AssembledChannel(SuspendableReadChannel readChannel,
SuspendableWriteChannel writeChannel)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this channel.
|
ChannelListener.Setter<? extends CloseableChannel> |
getCloseSetter()
Get the setter which can be used to change the close listener for this channel.
|
XnioIoThread |
getIoThread()
Get the I/O thread associated with this channel.
|
<T> T |
getOption(Option<T> option)
Get the value of a channel option.
|
XnioWorker |
getWorker()
Get the worker for this channel.
|
boolean |
isOpen() |
<T> T |
setOption(Option<T> option,
T value)
Set an option for this channel.
|
boolean |
supportsOption(Option<?> option)
Determine whether an option is supported on this channel.
|
public AssembledChannel(SuspendableReadChannel readChannel, SuspendableWriteChannel writeChannel)
readChannel
- the read sidewriteChannel
- the write sidepublic ChannelListener.Setter<? extends CloseableChannel> getCloseSetter()
CloseableChannel
getCloseSetter
in interface CloseableChannel
public XnioWorker getWorker()
CloseableChannel
getWorker
in interface CloseableChannel
public XnioIoThread getIoThread()
CloseableChannel
getIoThread
in interface CloseableChannel
public void close() throws java.io.IOException
CloseableChannel
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
close
in interface java.nio.channels.InterruptibleChannel
close
in interface CloseableChannel
java.io.IOException
- if the close failedpublic boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public boolean supportsOption(Option<?> option)
Configurable
supportsOption
in interface Configurable
option
- the optiontrue
if it is supportedpublic <T> T getOption(Option<T> option) throws java.io.IOException
Configurable
getOption
in interface Configurable
T
- the type of the option valueoption
- the option to getnull
if it is not setjava.io.IOException
- if an I/O error occurred when reading the optionpublic <T> T setOption(Option<T> option, T value) throws java.lang.IllegalArgumentException, java.io.IOException
Configurable
setOption
in interface Configurable
T
- the type of the option valueoption
- the option to setvalue
- the value of the option to setjava.lang.IllegalArgumentException
- if the value is not acceptable for this optionjava.io.IOException
- if an I/O error occurred when modifying the optionCopyright © 2016 JBoss, a division of Red Hat, Inc.