Top Description Fields Constructors Methods
org.xnio.channels

public Class AssembledConnectedStreamChannel

extends AssembledStreamChannel
implements ConnectedStreamChannel
Class Inheritance
All Implemented Interfaces
org.xnio.channels.ConnectedStreamChannel, 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.StreamChannel, org.xnio.channels.ByteChannel, java.nio.channels.ScatteringByteChannel, java.nio.channels.ReadableByteChannel, java.nio.channels.GatheringByteChannel, java.nio.channels.WritableByteChannel, java.nio.channels.ByteChannel, org.xnio.channels.StreamSourceChannel, org.xnio.channels.SuspendableReadChannel, org.xnio.channels.StreamSinkChannel, org.xnio.channels.SuspendableWriteChannel, org.xnio.channels.SuspendableChannel
Known Direct Subclasses
org.xnio.channels.AssembledConnectedSslStreamChannel
Imports
java.net.SocketAddress, org.xnio.ChannelListener

A connected stream channel assembled from a stream source and stream sink.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final ConnectedChannel

Constructor Summary

AccessConstructor and Description
public
AssembledConnectedStreamChannel(final ConnectedChannel
the connected channel
connection
,
final StreamSourceChannel
the source
source
,
final StreamSinkChannel
the sink
sink
)

Construct a new instance.

public
AssembledConnectedStreamChannel(final StreamSourceChannel
the source
source
,
final StreamSinkChannel
the sink
sink
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public ChannelListener.Setter<? extends AssembledConnectedStreamChannel>
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 AssembledConnectedStreamChannel>
public ChannelListener.Setter<? extends AssembledConnectedStreamChannel>
Inherited from org.xnio.channels.AssembledStreamChannel:
awaitReadableawaitReadableawaitWritableawaitWritablecloseflushgetIoThreadgetOptiongetReadThreadgetWorkergetWriteThreadisOpenisReadResumedisWriteResumedreadreadreadresumeReadsresumeWritessetOptionshutdownReadsshutdownWritessupportsOptionsuspendReadssuspendWritestransferFromtransferFromtransferTotransferTowakeupReadswakeupWriteswritewritewritewriteFinalwriteFinalwriteFinal

Field Detail

connectionback to summary
private final ConnectedChannel connection

Constructor Detail

AssembledConnectedStreamChannelback to summary
public AssembledConnectedStreamChannel(final ConnectedChannel connection, final StreamSourceChannel source, final StreamSinkChannel sink)

Construct a new instance.

Parameters
connection:ConnectedChannel

the connected channel

source:StreamSourceChannel

the source

sink:StreamSinkChannel

the sink

AssembledConnectedStreamChannelback to summary
public AssembledConnectedStreamChannel(final StreamSourceChannel source, final StreamSinkChannel sink)

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

Parameters
source:StreamSourceChannel

the source

sink:StreamSinkChannel

the sink

Method Detail

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

Overrides org.xnio.channels.AssembledStreamChannel.getCloseSetter.

Implements org.xnio.channels.ConnectedStreamChannel.getCloseSetter, org.xnio.channels.StreamChannel.getCloseSetter.

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

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 AssembledConnectedStreamChannel> getReadSetter()

Overrides org.xnio.channels.AssembledStreamChannel.getReadSetter.

Implements org.xnio.channels.ConnectedStreamChannel.getReadSetter, org.xnio.channels.StreamChannel.getReadSetter.

Doc from org.xnio.channels.ConnectedStreamChannel.getReadSetter.

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

Returns:ChannelListener.Setter<? extends AssembledConnectedStreamChannel>

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

the setter

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

Overrides org.xnio.channels.AssembledStreamChannel.getWriteSetter.

Implements org.xnio.channels.ConnectedStreamChannel.getWriteSetter, org.xnio.channels.StreamChannel.getWriteSetter.

Doc from org.xnio.channels.ConnectedStreamChannel.getWriteSetter.

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

Returns:ChannelListener.Setter<? extends AssembledConnectedStreamChannel>

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

the setter

Annotations
@SuppressWarnings:unchecked