XNIO API 3.0.7.GA

org.xnio.channels
Interface BoundServerChannel

All Superinterfaces:
Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel

public interface BoundServerChannel
extends CloseableChannel

A server that is bound to one or more local addresses.

Since:
1.2

Method Summary
 IoFuture<? extends BoundChannel> bind(SocketAddress address)
          Add a binding.
 Collection<? extends BoundChannel> getChannels()
          Get the channels representing the individual bound servers.
 ChannelListener.Setter<? extends BoundServerChannel> getCloseSetter()
          Get the setter which can be used to change the close listener for this channel.
 
Methods inherited from interface org.xnio.channels.CloseableChannel
close, getWorker
 
Methods inherited from interface java.nio.channels.Channel
isOpen
 
Methods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOption
 

Method Detail

getChannels

Collection<? extends BoundChannel> getChannels()
Get the channels representing the individual bound servers. The collection is a snapshot view of the bound channels; modifications to the collection are not allowed. However the channels within the collection are live references to the bindings that exist at the time this method is called; these channels may be closed to unbind the channel.

Returns:
the channels

bind

IoFuture<? extends BoundChannel> bind(SocketAddress address)
Add a binding. The returned channel may be used to close the binding.

Parameters:
address - the address to bind to
Returns:
a future channel representing the binding

getCloseSetter

ChannelListener.Setter<? extends BoundServerChannel> getCloseSetter()
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.

Specified by:
getCloseSetter in interface CloseableChannel
Returns:
the setter

XNIO API 3.0.7.GA

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