Top Description Fields Constructors Methods
org.xnio.channels

public Class AssembledConnectedChannel

extends AssembledChannel
implements ConnectedChannel
Class Inheritance
All Implemented Interfaces
org.xnio.channels.ConnectedChannel, org.xnio.channels.BoundChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, java.nio.channels.InterruptibleChannel, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
org.xnio.channels.AssembledSslChannel
Static Imports
org.xnio._private.Messages.msg

A closeable, connected view over a read and write side of a suspendable channel, at least one of which is connected.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final ConnectedChannel

Constructor Summary

AccessConstructor and Description
public
AssembledConnectedChannel(final SuspendableReadChannel
the read channel
readChannel
,
final SuspendableWriteChannel
the write channel
writeChannel
)

Construct a new instance.

Method Summary

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

Overrides org.xnio.channels.AssembledChannel.getCloseSetter.

Implements org.xnio.channels.ConnectedChannel.getCloseSetter, org.xnio.channels.CloseableChannel.getCloseSetter.

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

public SocketAddress
getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

public <A extends SocketAddress> A
getLocalAddress(final Class<A>
the address type class
type
)

Implements org.xnio.channels.BoundChannel.getLocalAddress.

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

public SocketAddress
getPeerAddress()

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Get the peer address of this channel.

public <A extends SocketAddress> A
getPeerAddress(final Class<A>
the address type class
type
)

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

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

Inherited from org.xnio.channels.AssembledChannel:
closegetIoThreadgetOptiongetWorkerisOpensetOptionsupportsOption

Field Detail

connectionback to summary
private final ConnectedChannel connection

Constructor Detail

AssembledConnectedChannelback to summary
public AssembledConnectedChannel(final SuspendableReadChannel readChannel, final SuspendableWriteChannel writeChannel)

Construct a new instance. At least one of the channels must be an instance of ConnectedChannel.

Parameters
readChannel:SuspendableReadChannel

the read channel

writeChannel:SuspendableWriteChannel

the write channel

Method Detail

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

Overrides org.xnio.channels.AssembledChannel.getCloseSetter.

Implements org.xnio.channels.ConnectedChannel.getCloseSetter, org.xnio.channels.CloseableChannel.getCloseSetter.

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

Returns:ChannelListener.Setter<? extends AssembledConnectedChannel>

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

the setter

Annotations
@SuppressWarnings:unchecked
getLocalAddressback to summary
public SocketAddress getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.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(final Class<A> type)

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

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

getPeerAddressback to summary
public SocketAddress getPeerAddress()

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Doc from org.xnio.channels.ConnectedChannel.getPeerAddress.

Get the peer address of this channel.

Returns:SocketAddress

the peer address

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

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Doc from org.xnio.channels.ConnectedChannel.getPeerAddress.

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