org.xnio.channels
Interface ConnectedChannel
- All Superinterfaces:
- BoundChannel, Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel
- All Known Subinterfaces:
- ConnectedMessageChannel, ConnectedSslStreamChannel, ConnectedStreamChannel
- All Known Implementing Classes:
- FramedMessageChannel
public interface ConnectedChannel
- extends BoundChannel
A channel that has a local and peer endpoint address.
Methods inherited from interface java.nio.channels.Channel |
isOpen |
getPeerAddress
SocketAddress getPeerAddress()
- Get the peer address of this channel.
- Returns:
- the peer address
getPeerAddress
<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
- the address type class
- Returns:
- the peer address, or
null
if unknown
getCloseSetter
ChannelListener.Setter<? extends ConnectedChannel> 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 BoundChannel
- Specified by:
getCloseSetter
in interface CloseableChannel
- Returns:
- the setter
Copyright © 2010 JBoss, a division of Red Hat, Inc.