C - the consumed generic typeP - the produced generic typepublic abstract class PipeCommand<C,P> extends java.lang.Object implements Filter<C,P,InvocationContext<P>>
| Modifier and Type | Field and Description |
|---|---|
protected InvocationContext<P> |
context
.
|
| Constructor and Description |
|---|
PipeCommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close pipe.
|
void |
flush()
Flush pipe.
|
java.lang.Class<C> |
getConsumedType()
Returns the class of the element generic type.
|
java.lang.Class<P> |
getProducedType()
Returns the class of the produced type.
|
boolean |
isPiped() |
void |
open()
Open pipe.
|
void |
open(InvocationContext<P> consumer)
Open the producer with the specified consumer.
|
void |
provide(C element)
Extends the throw clause of the
Consumer.provide(Object) method. |
protected InvocationContext<P> context
public final boolean isPiped()
public final java.lang.Class<P> getProducedType()
ProducergetProducedType in interface Producer<P,InvocationContext<P>>public final java.lang.Class<C> getConsumedType()
ConsumergetConsumedType in interface Consumer<C>public void open(InvocationContext<P> consumer)
Produceropen in interface Producer<P,InvocationContext<P>>consumer - the consumerpublic void open()
throws ScriptException
ScriptExceptionpublic void provide(C element) throws ScriptException, java.io.IOException
Consumer.provide(Object) method.provide in interface Consumer<C>element - the provided elementScriptException - any script exceptionjava.io.IOException - any io exceptionpublic void flush()
throws ScriptException,
java.io.IOException
flush in interface java.io.FlushableScriptException - any script exceptionjava.io.IOException - any io exceptionpublic void close()
throws ScriptException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface Producer<P,InvocationContext<P>>ScriptException - any script exceptionCopyright © 2014 eXo Platform SAS. All Rights Reserved.