|
||||||||||
| 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. |
void |
open()
Open pipe. |
void |
open(InvocationContext<P> consumer)
Open the producer with the specified consumer. |
void |
provide(C element)
Provide an element. |
| 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 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)
throws Exception
Producer
open in interface Producer<P,InvocationContext<P>>consumer - the consumer
Exception - any exception
public void open()
throws Exception
Exception
public void provide(C element)
throws Exception
Consumer
provide in interface Consumer<C>element - the provided element
Exception - any exception
public void flush()
throws IOException
flush in interface Consumer<C>IOException - any io exception
public void close()
throws Exception
close in interface Producer<P,InvocationContext<P>>Exception - any exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||