XNIO version 1.2.0.GA

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

Type Parameters:
A - the type of address associated with this channel
All Superinterfaces:
Channel, Closeable, Configurable, SuspendableReadChannel
All Known Subinterfaces:
MultipointDatagramChannel<A>, MultipointMessageChannel<A>, UdpChannel

public interface MultipointReadableMessageChannel<A>
extends SuspendableReadChannel, Configurable

The readable side of a multipoint message channel.

See Also:
MultipointMessageChannel

Method Summary
 MultipointReadResult<A> receive(ByteBuffer buffer)
          Receive a message via this channel.
 
Methods inherited from interface org.jboss.xnio.channels.SuspendableReadChannel
awaitReadable, awaitReadable, resumeReads, shutdownReads, suspendReads
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, getOptions, setOption
 

Method Detail

receive

MultipointReadResult<A> receive(ByteBuffer buffer)
                                throws IOException
Receive a message via this channel. If a message is immediately available, then the datagram is written into the given buffer and the source and destination addresses (if available) are returned. If there is no message immediately available, this method will return null.

Parameters:
buffer - the buffer into which data should be read
Returns:
a result instance if a message was found and processed, or null if the operation would block
Throws:
IOException - if an I/O error occurs

XNIO version 1.2.0.GA

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