org.jboss.xnio.channels
Interface Configurable

All Known Subinterfaces:
AllocatedMessageChannel, BoundServer<A,T>, ConfigurableFactory<T>, ConnectedStreamChannel<A>, DatagramChannel<A>, MessageChannel, MultipointDatagramChannel<A>, MultipointMessageChannel<A>, MultipointReadableMessageChannel<A>, MultipointWritableMessageChannel<A>, ReadableAllocatedMessageChannel, ReadableMessageChannel, StreamChannel, StreamSinkChannel, StreamSourceChannel, SuspendableChannel, SuspendableReadChannel, SuspendableWriteChannel, TcpChannel, UdpChannel, WritableMessageChannel
All Known Implementing Classes:
AbstractConfigurable, BioDatagramChannelImpl, BioMulticastChannelImpl, BioUdpServer, BioUdpServerFactory, NioPipeChannelImpl, NioPipeSinkChannelImpl, NioPipeSourceChannelImpl, NioTcpAcceptorFactory, NioTcpChannel, NioTcpConnectorFactory, NioTcpServer, NioTcpServerFactory, NioUdpServer, NioUdpServerFactory, NioUdpSocketChannelImpl

public interface Configurable

A channel that has parameters that may be configured while the channel is open.


Method Summary
<T> T
getOption(ChannelOption<T> option)
          Get the value of a channel option.
 java.util.Set<ChannelOption<?>> getOptions()
          Get the options that may be set on this channel.
<T> Configurable
setOption(ChannelOption<T> option, T value)
          Set an option for this channel.
 

Method Detail

getOption

<T> T getOption(ChannelOption<T> option)
            throws UnsupportedOptionException,
                   java.io.IOException
Get the value of a channel option.

Type Parameters:
T - the type of the option value
Parameters:
option - the option to get
Returns:
the value of the option
Throws:
UnsupportedOptionException - if the option is not supported by this channel
java.io.IOException - if an I/O error occurred when reading the option

getOptions

java.util.Set<ChannelOption<?>> getOptions()
Get the options that may be set on this channel.

Returns:
an unmodifiable set of options

setOption

<T> Configurable setOption(ChannelOption<T> option,
                           T value)
                       throws java.lang.IllegalArgumentException,
                              java.io.IOException
Set an option for this channel.

Type Parameters:
T - the type of the option value
Parameters:
option - the option to set
value - the value of the option to set
Returns:
this channel
Throws:
UnsupportedOptionException - if the option is not supported by this channel
java.lang.IllegalArgumentException - if the value is not acceptable for this option
java.io.IOException - if an I/O error occured when modifying the option