Top Description Methods
org.xnio.channels

public Interface WritableMultipointMessageChannel

extends SuspendableWriteChannel
Known Direct Subinterfaces
org.xnio.channels.MultipointMessageChannel
Imports
java.net.SocketAddress, java.nio.ByteBuffer, java.io.IOException, org.xnio.ChannelListener

The writable side of a multipoint message channel.
See Also
MultipointMessageChannel

Method Summary

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

Redeclares org.xnio.channels.SuspendableWriteChannel.getCloseSetter.

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

public ChannelListener.Setter<? extends WritableMultipointMessageChannel>
getWriteSetter()

Redeclares org.xnio.channels.SuspendableWriteChannel.getWriteSetter.

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

public boolean

Returns:

true if the message was sent, or false if the channel is not currently writable
sendTo
(SocketAddress
the destination
target
,
ByteBuffer
the data to send
buffer
)

Send a buffer to a destination.

public boolean

Returns:

true if the message was sent, or false if the channel is not currently writable
sendTo
(SocketAddress
the destination
target
,
ByteBuffer[]
the data to send
buffers
)

Send a message with data from multiple buffers to a destination.

public boolean

Returns:

true if the message was sent, or false if the channel is not currently writable
sendTo
(SocketAddress
the destination
target
,
ByteBuffer[]
the data to send
buffers
,
int
the offset into the buffers array
offset
,
int
the number of buffers to read from
length
)

Send a message with data from multiple buffers to a destination.

Inherited from org.xnio.channels.SuspendableWriteChannel:
awaitWritableawaitWritablecloseflushgetWriteThreadisOpenisWriteResumedresumeWritesshutdownWritessuspendWriteswakeupWrites

Method Detail

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

Redeclares org.xnio.channels.SuspendableWriteChannel.getCloseSetter.

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

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

the setter

getWriteSetterback to summary
public ChannelListener.Setter<? extends WritableMultipointMessageChannel> getWriteSetter()

Redeclares org.xnio.channels.SuspendableWriteChannel.getWriteSetter.

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

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

Returns:ChannelListener.Setter<? extends WritableMultipointMessageChannel>

the setter

sendToback to summary
public boolean sendTo(SocketAddress target, ByteBuffer buffer) throws IOException

Send a buffer to a destination.

Parameters
target:SocketAddress

the destination

buffer:ByteBuffer

the data to send

Returns:boolean

true if the message was sent, or false if the channel is not currently writable

Exceptions
IOException:
if an I/O error occurs
sendToback to summary
public boolean sendTo(SocketAddress target, ByteBuffer[] buffers) throws IOException

Send a message with data from multiple buffers to a destination.

Parameters
target:SocketAddress

the destination

buffers:ByteBuffer[]

the data to send

Returns:boolean

true if the message was sent, or false if the channel is not currently writable

Exceptions
IOException:
if an I/O error occurs
sendToback to summary
public boolean sendTo(SocketAddress target, ByteBuffer[] buffers, int offset, int length) throws IOException

Send a message with data from multiple buffers to a destination.

Parameters
target:SocketAddress

the destination

buffers:ByteBuffer[]

the data to send

offset:int

the offset into the buffers array

length:int

the number of buffers to read from

Returns:boolean

true if the message was sent, or false if the channel is not currently writable

Exceptions
IOException:
if an I/O error occurs