XNIO API 2.0.0.GA

org.jboss.xnio.channels
Interface MultipointWritableMessageChannel<A>

Type Parameters:
A - the type of address associated with this channel
All Superinterfaces:
java.nio.channels.Channel, java.io.Closeable, CloseableChannel, Configurable, SuspendableWriteChannel
All Known Subinterfaces:
MultipointDatagramChannel<A>, MultipointMessageChannel<A>, UdpChannel

public interface MultipointWritableMessageChannel<A>
extends SuspendableWriteChannel

The writable side of a multipoint message channel.

See Also:
MultipointMessageChannel

Method Summary
 ChannelListener.Setter<? extends MultipointWritableMessageChannel<A>> getCloseSetter()
          Get the setter which can be used to change the close handler for this channel.
 ChannelListener.Setter<? extends MultipointWritableMessageChannel<A>> getWriteSetter()
          Get the setter which can be used to change the write handler for this channel.
 boolean send(A target, java.nio.ByteBuffer buffer)
          Send a buffer to a destination.
 boolean send(A target, java.nio.ByteBuffer[] buffers)
          Send a message with data from multiple buffers to a destination.
 boolean send(A target, java.nio.ByteBuffer[] buffers, int offset, int length)
          Send a message with data from multiple buffers to a destination.
 
Methods inherited from interface org.jboss.xnio.channels.SuspendableWriteChannel
awaitWritable, awaitWritable, flush, resumeWrites, shutdownWrites, suspendWrites
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, setOption, supportsOption
 

Method Detail

send

boolean send(A target,
             java.nio.ByteBuffer buffer)
             throws java.io.IOException
Send a buffer to a destination.

Parameters:
target - the destination
buffer - the data to send
Returns:
true if the message was sent, or false if the channel is not currently writable
Throws:
java.io.IOException - if an I/O error occurs

send

boolean send(A target,
             java.nio.ByteBuffer[] buffers)
             throws java.io.IOException
Send a message with data from multiple buffers to a destination.

Parameters:
target - the destination
buffers - the data to send
Returns:
true if the message was sent, or false if the channel is not currently writable
Throws:
java.io.IOException - if an I/O error occurs

send

boolean send(A target,
             java.nio.ByteBuffer[] buffers,
             int offset,
             int length)
             throws java.io.IOException
Send a message with data from multiple buffers to a destination.

Parameters:
target - the destination
buffers - the data to send
offset - the offset into the buffers array
length - the number of buffers to read from
Returns:
true if the message was sent, or false if the channel is not currently writable
Throws:
java.io.IOException - if an I/O error occurs

getWriteSetter

ChannelListener.Setter<? extends MultipointWritableMessageChannel<A>> getWriteSetter()
Get the setter which can be used to change the write handler for this channel. When the handler is called, additional notifications are automatically suspended.

Specified by:
getWriteSetter in interface SuspendableWriteChannel
Returns:
the setter

getCloseSetter

ChannelListener.Setter<? extends MultipointWritableMessageChannel<A>> getCloseSetter()
Get the setter which can be used to change the close handler for this channel. If the channel is already closed, then the handler will not be called.

Specified by:
getCloseSetter in interface CloseableChannel
Specified by:
getCloseSetter in interface SuspendableWriteChannel
Returns:
the setter

XNIO API 2.0.0.GA

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