Top Description Methods
org.xnio.channels

public Interface BoundChannel

extends CloseableChannel
Known Direct Subinterfaces
org.xnio.channels.BoundMultipointMessageChannel, org.xnio.channels.ConnectedChannel, org.xnio.channels.AcceptingChannel
Imports
java.net.SocketAddress, org.xnio.ChannelListener

A channel that is bound to a local address.

Method Summary

Modifier and TypeMethod and Description
public ChannelListener.Setter<? extends BoundChannel>
getCloseSetter()

Redeclares org.xnio.channels.CloseableChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel.

public SocketAddress

Returns:

the local address
getLocalAddress
()

Get the local address that this channel is bound to.

public <
the address type
A extends SocketAddress
>
A

Returns:

the local address, or null if unknown
getLocalAddress
(Class<A>
the address type class
type
)

Get the local address of a given type, or null if the address is not of that type.

Inherited from org.xnio.channels.CloseableChannel:
closegetIoThreadgetWorker

Method Detail

getCloseSetterback to summary
public ChannelListener.Setter<? extends BoundChannel> getCloseSetter()

Redeclares org.xnio.channels.CloseableChannel.getCloseSetter.

Doc from org.xnio.channels.CloseableChannel.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.

Returns:ChannelListener.Setter<? extends BoundChannel>

the setter

getLocalAddressback to summary
public SocketAddress getLocalAddress()

Get the local address that this channel is bound to.

Returns:SocketAddress

the local address

getLocalAddressback to summary
public <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.

Parameters
<A>
the address type
type:Class<A>

the address type class

Returns:A

the local address, or null if unknown