XNIO version 1.0.0.GA

org.jboss.xnio.channels
Interface WritableMessageChannel

All Superinterfaces:
Channel, Closeable, Configurable, SuspendableWriteChannel
All Known Subinterfaces:
DatagramChannel<A>, MessageChannel

public interface WritableMessageChannel
extends SuspendableWriteChannel, Configurable

A channel that can send messages.


Method Summary
 boolean send(ByteBuffer buffer)
          Send a complete message.
 boolean send(ByteBuffer[] buffers)
          Send a complete message.
 boolean send(ByteBuffer[] buffers, int offs, int len)
          Send a complete message.
 
Methods inherited from interface org.jboss.xnio.channels.SuspendableWriteChannel
resumeWrites, shutdownWrites, suspendWrites
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, getOptions, setOption
 

Method Detail

send

boolean send(ByteBuffer buffer)
             throws IOException
Send a complete message.

Parameters:
buffer - the message to send
Returns:
true if the message was sent, or false if there was insufficient room in the send buffer
Throws:
IOException - if an I/O error occurs

send

boolean send(ByteBuffer[] buffers)
             throws IOException
Send a complete message.

Parameters:
buffers - the buffers holding the message to send
Returns:
true if the message was sent, or false if there was insufficient room in the send buffer
Throws:
IOException - if an I/O error occurs

send

boolean send(ByteBuffer[] buffers,
             int offs,
             int len)
             throws IOException
Send a complete message.

Parameters:
buffers - the buffers holding the message to send
offs - the offset into the buffer array of the first buffer
len - the number of buffers that contain data to send
Returns:
true if the message was sent, or false if there was insufficient room in the send buffer
Throws:
IOException - if an I/O error occurs

XNIO version 1.0.0.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.