|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.PipeCommandProxy<C,P>
class PipeCommandProxy<C,P>
| Field Summary | |
|---|---|
private CommandInvoker<C,P> |
delegate
. |
private InteractionContext<P> |
innerContext
. |
private Consumer<C> |
next
. |
| Constructor Summary | |
|---|---|
PipeCommandProxy(InteractionContext<P> innerContext,
CommandInvoker<C,P> delegate,
Consumer<C> next)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the producer. |
(package private) void |
fire()
|
void |
flush()
|
Class<C> |
getConsumedType()
Returns the class of the element generic type. |
Class<P> |
getProducedType()
Returns the class of the produced type. |
void |
open(InteractionContext<P> consumer)
Open the producer with the specified consumer. |
void |
provide(C element)
Provide an element. |
void |
setPiped(boolean piped)
Set the pipe status. |
void |
setSession(CommandContext session)
Associate the command invoker with a session, the association should be done before the command is invoked. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final InteractionContext<P> innerContext
private final CommandInvoker<C,P> delegate
private final Consumer<C> next
| Constructor Detail |
|---|
PipeCommandProxy(InteractionContext<P> innerContext,
CommandInvoker<C,P> delegate,
Consumer<C> next)
| Method Detail |
|---|
void fire()
public void setSession(CommandContext session)
CommandInvoker
setSession in interface CommandInvoker<C,P>session - the sessionpublic Class<P> getProducedType()
Producer
getProducedType in interface Producer<P,InteractionContext<P>>public Class<C> getConsumedType()
Consumer
getConsumedType in interface Consumer<C>public void setPiped(boolean piped)
Producer
setPiped in interface Producer<P,InteractionContext<P>>piped - the piped statuspublic void open(InteractionContext<P> consumer)
Producer
open in interface Producer<P,InteractionContext<P>>consumer - the consumer
public void provide(C element)
throws ScriptException,
IOException
Consumer
provide in interface Consumer<C>element - the provided element
ScriptException
IOException
public void flush()
throws ScriptException,
IOException
flush in interface FlushableScriptException
IOException
public void close()
throws ScriptException
Producer
close in interface Closeableclose in interface Producer<P,InteractionContext<P>>ScriptException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||