XNIO version 1.2.0.GA

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

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.
 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,
                   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
IOException - if an I/O error occurred when reading the option

getOptions

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 IllegalArgumentException,
                              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
IllegalArgumentException - if the value is not acceptable for this option
IOException - if an I/O error occured when modifying the option

XNIO version 1.2.0.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.