org.openrdf.http.object.util
Class ProducerChannel

java.lang.Object
  extended by org.openrdf.http.object.util.ProducerChannel
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel

public class ProducerChannel
extends Object
implements ReadableByteChannel

A Piped ReadableByteChannel that runs the producer in another thread.

Author:
James Leigh

Nested Class Summary
static interface ProducerChannel.WritableProducer
           
 
Constructor Summary
ProducerChannel(ProducerChannel.WritableProducer producer)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProducerChannel

public ProducerChannel(ProducerChannel.WritableProducer producer)
                throws IOException
Throws:
IOException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.