public interface Feeder extends Service
Implementations of Feeder
start feeding data
to the OutputStream
passed to setOut()
as soon as their Runnable.run()
method is
called. The contract for use of a Feeder
is as
follows:
setOut()
is called first to specify where the
Feeder
must deliver the data,run()
(according the inherited interface
Service
) is called for the the Feeder
to actually deliver the data,Feeder
closes the OutputStream
set with setOut
depening on the second parameter of
setOut
before run()
terminates.Hint: A Feeder
can be easily implemented by
subclassing AbstractPipe
.
Drainer
Modifier and Type | Method and Description |
---|---|
void |
setOut(java.io.OutputStream out,
boolean closeOnExit)
specifies the
OutputStream where to deliver the
data in the run() method. |
getException