|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.Pipe<C,P>
C - the consumed generic typeP - the produced generic typepublic abstract class Pipe<C,P>
A command pipe.
| Field Summary | |
|---|---|
protected InvocationContext<P> |
context
. |
| Constructor Summary | |
|---|---|
Pipe()
|
|
| Method Summary | |
|---|---|
void |
close()
Close pipe. |
void |
flush()
Flush pipe. |
Class<C> |
getConsumedType()
Returns the class of the element generic type. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected InvocationContext<P> context
| Constructor Detail |
|---|
public Pipe()
| Method Detail |
|---|
public final boolean isPiped()
public final Class<P> getProducedType()
Producer
getProducedType in interface Producer<P,InvocationContext<P>>public final Class<C> getConsumedType()
Consumer
getConsumedType in interface Consumer<C>public void open(InvocationContext<P> consumer)
Producer
open in interface Producer<P,InvocationContext<P>>consumer - the consumer
public void open()
throws ScriptException
ScriptException
public void provide(C element)
throws ScriptException,
IOException
Consumer.provide(Object) method.
provide in interface Consumer<C>element - the provided element
ScriptException - any script exception
IOException - any io exception
public void flush()
throws ScriptException,
IOException
flush in interface FlushableScriptException - any script exception
IOException - any io exception
public void close()
throws ScriptException,
IOException
close in interface Closeableclose in interface Producer<P,InvocationContext<P>>ScriptException - any script exception
IOException - any io exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||