XNIO API 3.0.4.GA

org.xnio.channels
Interface BoundChannel

All Superinterfaces:
Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel
All Known Subinterfaces:
AcceptingChannel<C>, BoundMultipointMessageChannel, ConnectedChannel, ConnectedMessageChannel, ConnectedSslStreamChannel, ConnectedStreamChannel, MulticastMessageChannel
All Known Implementing Classes:
FramedMessageChannel

public interface BoundChannel
extends CloseableChannel

A channel that is bound to a local address.


Method Summary
 ChannelListener.Setter<? extends BoundChannel> getCloseSetter()
          Get the setter which can be used to change the close listener for this channel.
 SocketAddress getLocalAddress()
          Get the local address that this channel is bound to.
<A extends SocketAddress>
A
getLocalAddress(Class<A> type)
          Get the local address of a given type, or null if the address is not of that type.
 
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

getLocalAddress

SocketAddress getLocalAddress()
Get the local address that this channel is bound to.

Returns:
the local address

getLocalAddress

<A extends SocketAddress> A getLocalAddress(Class<A> type)
Get the local address of a given type, or null if the address is not of that type.

Type Parameters:
A - the address type
Parameters:
type - the address type class
Returns:
the local address, or null if unknown

getCloseSetter

ChannelListener.Setter<? extends BoundChannel> 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.4.GA

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