org.jboss.xnio.nio
Class AbstractConfigurable
java.lang.Object
org.jboss.xnio.nio.AbstractConfigurable
- All Implemented Interfaces:
- Configurable
- Direct Known Subclasses:
- BioUdpServerFactory, NioTcpAcceptorFactory, NioTcpConnectorFactory, NioTcpServerFactory, NioUdpServerFactory
public abstract class AbstractConfigurable
- extends java.lang.Object
- implements Configurable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConfigurable
protected AbstractConfigurable(java.util.Set<ChannelOption<?>> validOptions)
getOptions
public java.util.Set<ChannelOption<?>> getOptions()
- Description copied from interface:
Configurable
- Get the options that may be set on this channel.
- Specified by:
getOptions
in interface Configurable
- Returns:
- an unmodifiable set of options
getOption
public <T> T getOption(ChannelOption<T> option)
throws UnsupportedOptionException,
java.io.IOException
- Description copied from interface:
Configurable
- Get the value of a channel option.
- Specified by:
getOption
in interface Configurable
- 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
setOption
public <T> AbstractConfigurable setOption(ChannelOption<T> option,
T value)
throws java.lang.IllegalArgumentException,
java.io.IOException
- Description copied from interface:
Configurable
- Set an option for this channel.
- Specified by:
setOption
in interface Configurable
- Type Parameters:
T
- the type of the option value- Parameters:
option
- the option to setvalue
- 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