Top Description Methods
org.xnio.channels

public Interface ConnectedChannel

extends BoundChannel
Known Direct Subinterfaces
org.xnio.channels.ConnectedMessageChannel, org.xnio.channels.ConnectedStreamChannel, org.xnio.channels.SslChannel
Known Direct Implementers
org.xnio.Connection, org.xnio.channels.AssembledConnectedChannel
Imports
java.net.SocketAddress, org.xnio.ChannelListener

A channel that has a local and peer endpoint address.

Method Summary

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

Redeclares org.xnio.channels.BoundChannel.getCloseSetter.

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

public SocketAddress

Returns:

the peer address
getPeerAddress
()

Get the peer address of this channel.

public <A extends SocketAddress> A

Returns:

the peer address, or null if unknown
getPeerAddress
(Class<A>
the address type class
type
)

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

Inherited from org.xnio.channels.BoundChannel:
getLocalAddressgetLocalAddress

Method Detail

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

Redeclares org.xnio.channels.BoundChannel.getCloseSetter.

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

Returns:ChannelListener.Setter<? extends ConnectedChannel>

Doc from org.xnio.channels.CloseableChannel.getCloseSetter.

the setter

getPeerAddressback to summary
public SocketAddress getPeerAddress()

Get the peer address of this channel.

Returns:SocketAddress

the peer address

getPeerAddressback to summary
public <A extends SocketAddress> A getPeerAddress(Class<A> type)

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

Parameters
type:Class<A>

the address type class

Returns:A

the peer address, or null if unknown