org.jboss.shrinkwrap.impl.base.exporter
Class FutureCompletionInputStream
java.lang.Object
java.io.InputStream
java.io.PipedInputStream
org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream
- Type Parameters:
T
- Response type of the Future
- All Implemented Interfaces:
- Closeable
public class FutureCompletionInputStream
- extends PipedInputStream
PipedInputStream
which, when fully-read, will
block upon a Future
and report any exceptional
circumstances to the owning Thread.
- Author:
- ALR
Method Summary |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FutureCompletionInputStream
public FutureCompletionInputStream(Future<?> job)
- Creates a new Stream
read
public int read()
throws IOException
-
- Overrides:
read
in class PipedInputStream
- Throws:
IOException
- See Also:
PipedInputStream.read()
read
public int read(byte[] b,
int off,
int len)
throws IOException
-
- Overrides:
read
in class PipedInputStream
- Throws:
IOException
- See Also:
PipedInputStream.read(byte[], int, int)
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.