Top Description Fields Methods
org.xnio.channels

public Interface WritableMessageChannel

extends SuspendableWriteChannel, Configurable
Known Direct Subinterfaces
org.xnio.channels.MessageChannel
Known Direct Implementers
org.xnio.conduits.ConduitWritableMessageChannel
Imports
java.io.IOException, java.nio.ByteBuffer, org.xnio.ChannelListener

A channel that can send messages.

Field Summary

Inherited from org.xnio.channels.Configurable:
EMPTY

Method Summary

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

the result of the send operation; true if the message was sent, or false if it would block
send
(ByteBuffer
the message to send
buffer
)

Send a complete message.

public boolean

Returns:

the result of the send operation; true if the message was sent, or false if it would block
send
(ByteBuffer[]
the buffers holding the message to send
buffers
)

Send a complete message.

public boolean

Returns:

the result of the send operation; true if the message was sent, or false if it would block
send
(ByteBuffer[]
the buffers holding the message to send
buffers
,
int
the offset into the buffer array of the first buffer
offs
,
int
the number of buffers that contain data to send
len
)

Send a complete message.

public boolean

Returns:

the result of the send operation; true if the message was sent, or false if it would block
sendFinal
(ByteBuffer
the message to send
buffer
)

Send a complete message.

public boolean

Returns:

the result of the send operation; true if the message was sent, or false if it would block
sendFinal
(ByteBuffer[]
the buffers holding the message to send
buffers
)

Send a complete message.

public boolean

Returns:

the result of the send operation; true if the message was sent, or false if it would block
sendFinal
(ByteBuffer[]
the buffers holding the message to send
buffers
,
int
the offset into the buffer array of the first buffer
offs
,
int
the number of buffers that contain data to send
len
)

Send a complete message.

Inherited from org.xnio.channels.Configurable:
getOptionsetOptionsupportsOption
Inherited from org.xnio.channels.SuspendableWriteChannel:
awaitWritableawaitWritablecloseflushgetWriteThreadisOpenisWriteResumedresumeWritesshutdownWritessuspendWriteswakeupWrites

Method Detail

getCloseSetterback to summary
public ChannelListener.Setter<? extends WritableMessageChannel> 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 WritableMessageChannel>

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

the setter

getWriteSetterback to summary
public ChannelListener.Setter<? extends WritableMessageChannel> 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 WritableMessageChannel>

the setter

sendback to summary
public boolean send(ByteBuffer buffer) throws IOException

Send a complete message.

Parameters
buffer:ByteBuffer

the message to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs
sendback to summary
public boolean send(ByteBuffer[] buffers) throws IOException

Send a complete message.

Parameters
buffers:ByteBuffer[]

the buffers holding the message to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs
sendback to summary
public boolean send(ByteBuffer[] buffers, int offs, int len) throws IOException

Send a complete message.

Parameters
buffers:ByteBuffer[]

the buffers holding the message to send

offs:int

the offset into the buffer array of the first buffer

len:int

the number of buffers that contain data to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs
sendFinalback to summary
public boolean sendFinal(ByteBuffer buffer) throws IOException

Send a complete message. If the message was successfully sent the channel with have its writes shutdown.

Parameters
buffer:ByteBuffer

the message to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs
sendFinalback to summary
public boolean sendFinal(ByteBuffer[] buffers) throws IOException

Send a complete message. If the message was successfully sent the channel with have its writes shutdown.

Parameters
buffers:ByteBuffer[]

the buffers holding the message to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs
sendFinalback to summary
public boolean sendFinal(ByteBuffer[] buffers, int offs, int len) throws IOException

Send a complete message. If the message was successfully sent the channel with have its writes shutdown.

Parameters
buffers:ByteBuffer[]

the buffers holding the message to send

offs:int

the offset into the buffer array of the first buffer

len:int

the number of buffers that contain data to send

Returns:boolean

the result of the send operation; true if the message was sent, or false if it would block

Exceptions
IOException:
if an I/O error occurs