|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.AsyncUnicastServer<I> net.sf.asyncobjects.io.util.GeneratingInput<D,I>
D
- a batched data typeI
- a facet typepublic abstract class GeneratingInput<D extends BatchedData<D>,I extends AInput<D>>
A input that generates some data.
Field Summary | |
---|---|
static long |
UNLIMITED
a unlimited value |
Constructor Summary | |
---|---|
GeneratingInput()
A consructor |
|
GeneratingInput(long toGenerate)
A consructor |
Method Summary | |
---|---|
Promise<Void> |
close()
Close resource |
protected abstract D |
generate(int limit)
Generate at most limit of the data |
Promise<Long> |
generated()
|
Promise<Boolean> |
isPushbackSupported()
|
Promise<Void> |
pushback(D data)
Attempt to return some data to stream. |
Promise<D> |
read(int limit)
Read some data. |
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer |
---|
dereference, export, isImmediate, myVat, promise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.asyncobjects.AsyncObject |
---|
dereference, isImmediate |
Field Detail |
---|
public static final long UNLIMITED
Constructor Detail |
---|
public GeneratingInput()
public GeneratingInput(long toGenerate)
toGenerate
- amount element to generateMethod Detail |
---|
public Promise<Boolean> isPushbackSupported()
isPushbackSupported
in interface AInput<D extends BatchedData<D>>
AInput.isPushbackSupported()
public Promise<Void> pushback(D data)
AInput
pushback
in interface AInput<D extends BatchedData<D>>
data
- a data to unread.
AInput.pushback(net.sf.asyncobjects.io.BatchedData)
public Promise<D> read(int limit)
AInput
read
in interface AInput<D extends BatchedData<D>>
limit
- a maximum amount of data elements to read.
AInput.read(int)
protected abstract D generate(int limit)
limit
- a limit on generated data
public Promise<Void> close()
ACloseable
close
in interface ACloseable
ACloseable.close()
public Promise<Long> generated()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |