public abstract class Pipe
extends java.lang.Object
Input to an Output.
It is recommended to use pipe only to stream data coming from server-side
services (e.g from your datastore/etc).
Incoming data from the interwebs should not be piped due to
validation/security purposes.| Modifier and Type | Class and Description |
|---|---|
static class |
Pipe.Schema<T>
|
| Modifier and Type | Field and Description |
|---|---|
protected Input |
input |
protected Output |
output |
| Constructor and Description |
|---|
Pipe() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Input |
begin(Pipe.Schema<?> pipeSchema)
Begin preliminary input processing.
|
protected abstract void |
end(Pipe.Schema<?> pipeSchema,
Input input,
boolean cleanupOnly)
End input processing.
|
protected Pipe |
reset()
Resets this pipe for re-use.
|
static <T> void |
transferDirect(Pipe.Schema<T> pipeSchema,
Pipe pipe,
Input input,
Output output)
This should not be called directly by applications.
|
protected Pipe reset()
protected abstract Input begin(Pipe.Schema<?> pipeSchema) throws java.io.IOException
java.io.IOExceptionprotected abstract void end(Pipe.Schema<?> pipeSchema, Input input, boolean cleanupOnly) throws java.io.IOException
cleanupOnly is true, the io processing ended prematurely hence the
underlying pipe should cleanup/close all resources that need to be.java.io.IOExceptionpublic static <T> void transferDirect(Pipe.Schema<T> pipeSchema, Pipe pipe, Input input, Output output) throws java.io.IOException
java.io.IOExceptionCopyright © 2009-2017. All Rights Reserved.