package org.xnio.channels;

import java.net.SocketAddress;
import org.xnio.ChannelListener;

A channel that is bound to a local address.
/** * A channel that is bound to a local address. */
public interface BoundChannel extends CloseableChannel {
Get the local address that this channel is bound to.
Returns:the local address
/** * Get the local address that this channel is bound to. * * @return the local address */
SocketAddress getLocalAddress();
Get the local address of a given type, or null if the address is not of that type.
Params:
  • type – the address type class
Type parameters:
  • <A> – the address type
Returns:the local address, or null if unknown
/** * Get the local address of a given type, or {@code null} if the address is not of that * type. * * @param type the address type class * @param <A> the address type * @return the local address, or {@code null} if unknown */
<A extends SocketAddress> A getLocalAddress(Class<A> type);
{@inheritDoc}
/** {@inheritDoc} */
ChannelListener.Setter<? extends BoundChannel> getCloseSetter(); }