XNIO version 1.2.0.GA

org.jboss.xnio.channels
Interface BoundServer<A,T extends BoundChannel<A>>

Type Parameters:
A - the type of address associated with this server
T - the channel type
All Superinterfaces:
Closeable, Configurable

public interface BoundServer<A,T extends BoundChannel<A>>
extends Closeable, Configurable

A server that is bound to a local address.

Since:
1.2

Method Summary
 IoFuture<T> bind(A address)
          Add a binding.
 Collection<T> getChannels()
          Get the channels representing the individual bound servers.
 
Methods inherited from interface java.io.Closeable
close
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, getOptions, setOption
 

Method Detail

getChannels

Collection<T> 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<T> bind(A 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

XNIO version 1.2.0.GA

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