Top Description Fields Constructors Methods
org.xnio.channels

public Class AssembledConnectedMessageChannel

extends AssembledMessageChannel
implements ConnectedMessageChannel
Class Inheritance
All Implemented Interfaces
org.xnio.channels.ConnectedMessageChannel, 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, org.xnio.channels.MessageChannel, org.xnio.channels.SuspendableChannel, org.xnio.channels.SuspendableWriteChannel, org.xnio.channels.SuspendableReadChannel, org.xnio.channels.WritableMessageChannel, org.xnio.channels.ReadableMessageChannel
Imports
java.net.SocketAddress, org.xnio.ChannelListener

A connected bidirectional message channel assembled from a readable and writable message channel.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final ConnectedChannel

Constructor Summary

AccessConstructor and Description
public
AssembledConnectedMessageChannel(final ConnectedChannel
the connected channel
connection
,
final ReadableMessageChannel
the read channel
readable
,
final WritableMessageChannel
the write channel
writable
)

Construct a new instance.

public
AssembledConnectedMessageChannel(final ReadableMessageChannel
the read channel
readable
,
final WritableMessageChannel
the write channel
writable
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public ChannelListener.Setter<? extends AssembledConnectedMessageChannel>
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.

public ChannelListener.Setter<? extends AssembledConnectedMessageChannel>
public ChannelListener.Setter<? extends AssembledConnectedMessageChannel>
Inherited from org.xnio.channels.AssembledMessageChannel:
awaitReadableawaitReadableawaitWritableawaitWritablecloseflushgetIoThreadgetOptiongetReadThreadgetWorkergetWriteThreadisOpenisReadResumedisWriteResumedreceivereceivereceiveresumeReadsresumeWritessendsendsendsendFinalsendFinalsendFinalsetOptionshutdownReadsshutdownWritessupportsOptionsuspendReadssuspendWriteswakeupReadswakeupWrites

Field Detail

connectionback to summary
private final ConnectedChannel connection

Constructor Detail

AssembledConnectedMessageChannelback to summary
public AssembledConnectedMessageChannel(final ConnectedChannel connection, final ReadableMessageChannel readable, final WritableMessageChannel writable)

Construct a new instance.

Parameters
connection:ConnectedChannel

the connected channel

readable:ReadableMessageChannel

the read channel

writable:WritableMessageChannel

the write channel

AssembledConnectedMessageChannelback to summary
public AssembledConnectedMessageChannel(final ReadableMessageChannel readable, final WritableMessageChannel writable)

Construct a new instance. At least one side must be connected.

Parameters
readable:ReadableMessageChannel

the read channel

writable:WritableMessageChannel

the write channel

Method Detail

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

Overrides org.xnio.channels.AssembledMessageChannel.getCloseSetter.

Implements org.xnio.channels.ConnectedMessageChannel.getCloseSetter, org.xnio.channels.MessageChannel.getCloseSetter.

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

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

getReadSetterback to summary
public ChannelListener.Setter<? extends AssembledConnectedMessageChannel> getReadSetter()

Overrides org.xnio.channels.AssembledMessageChannel.getReadSetter.

Implements org.xnio.channels.ConnectedMessageChannel.getReadSetter, org.xnio.channels.MessageChannel.getReadSetter.

Doc from org.xnio.channels.ConnectedMessageChannel.getReadSetter.

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

Returns:ChannelListener.Setter<? extends AssembledConnectedMessageChannel>

Doc from org.xnio.channels.SuspendableReadChannel.getReadSetter.

the setter

Annotations
@SuppressWarnings:unchecked
getWriteSetterback to summary
public ChannelListener.Setter<? extends AssembledConnectedMessageChannel> getWriteSetter()

Overrides org.xnio.channels.AssembledMessageChannel.getWriteSetter.

Implements org.xnio.channels.ConnectedMessageChannel.getWriteSetter, org.xnio.channels.MessageChannel.getWriteSetter.

Doc from org.xnio.channels.ConnectedMessageChannel.getWriteSetter.

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

Returns:ChannelListener.Setter<? extends AssembledConnectedMessageChannel>

Doc from org.xnio.channels.SuspendableWriteChannel.getWriteSetter.

the setter

Annotations
@SuppressWarnings:unchecked