-
- All Superinterfaces:
java.lang.AutoCloseable
,java.nio.channels.Channel
,java.io.Closeable
,CloseableChannel
,Configurable
,java.nio.channels.InterruptibleChannel
- All Known Subinterfaces:
AcceptingChannel<C>
,BoundMultipointMessageChannel
,ConnectedChannel
,ConnectedMessageChannel
,ConnectedSslStreamChannel
,ConnectedStreamChannel
,MulticastMessageChannel
,SslChannel
- All Known Implementing Classes:
AssembledConnectedChannel
,AssembledConnectedMessageChannel
,AssembledConnectedSslStreamChannel
,AssembledConnectedStreamChannel
,AssembledSslChannel
,Connection
,FramedMessageChannel
,JsseSslConnection
,JsseSslStreamConnection
,MessageConnection
,SslConnection
,StreamConnection
public interface BoundChannel extends CloseableChannel
A channel that is bound to a local address.
-
-
Field Summary
-
Fields inherited from interface org.xnio.channels.Configurable
EMPTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelListener.Setter<? extends BoundChannel>
getCloseSetter()
Get the setter which can be used to change the close listener for this channel.java.net.SocketAddress
getLocalAddress()
Get the local address that this channel is bound to.<A extends java.net.SocketAddress>
AgetLocalAddress(java.lang.Class<A> type)
Get the local address of a given type, ornull
if the address is not of that type.-
Methods inherited from interface org.xnio.channels.CloseableChannel
close, getIoThread, getWorker
-
Methods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOption
-
-
-
-
Method Detail
-
getLocalAddress
java.net.SocketAddress getLocalAddress()
Get the local address that this channel is bound to.- Returns:
- the local address
-
getLocalAddress
<A extends java.net.SocketAddress> A getLocalAddress(java.lang.Class<A> type)
Get the local address of a given type, ornull
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 interfaceCloseableChannel
- Returns:
- the setter
-
-