XNIO version 1.1.0.GA

org.jboss.xnio.channels
Interface SuspendableReadChannel

All Superinterfaces:
Channel, Closeable, Configurable
All Known Subinterfaces:
AllocatedMessageChannel, ConnectedStreamChannel<A>, DatagramChannel<A>, MessageChannel, MultipointDatagramChannel<A>, MultipointMessageChannel<A>, MultipointReadableMessageChannel<A>, ReadableAllocatedMessageChannel, ReadableMessageChannel, StreamChannel, StreamSourceChannel, SuspendableChannel, TcpChannel, UdpChannel

public interface SuspendableReadChannel
extends Channel, Configurable

A suspendable readable channel. This type of channel is associated with a handler which can suspend and resume reads as needed.


Method Summary
 void resumeReads()
          Resume reads on this channel.
 void shutdownReads()
          Places this readable channel at "end of stream".
 void suspendReads()
          Suspend further reads on this channel.
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, getOptions, setOption
 

Method Detail

suspendReads

void suspendReads()
Suspend further reads on this channel. The IoHandler.handleReadable(java.nio.channels.Channel) method will not be called until reads are resumed.


resumeReads

void resumeReads()
Resume reads on this channel. The IoHandler.handleReadable(java.nio.channels.Channel) method will be called as soon as there is data available to be read.


shutdownReads

void shutdownReads()
                   throws IOException
Places this readable channel at "end of stream". Further reads will result in EOF.

Throws:
IOException - if an I/O error occurs

XNIO version 1.1.0.GA

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