|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crsh.shell.impl.command.PipeLine
class PipeLine
Field Summary | |
---|---|
private Pipe.Invoker |
current
. |
private CommandInvoker[] |
invokers
. |
Constructor Summary | |
---|---|
PipeLine(CommandInvoker[] invokers)
|
Method Summary | |
---|---|
void |
close()
Close the producer. |
void |
flush()
|
Class<Void> |
getConsumedType()
Returns the class of the element generic type. |
Class<Chunk> |
getProducedType()
Returns the class of the produced type. |
void |
open(InteractionContext<Chunk> consumer)
Open the producer with the specified consumer. |
private InteractionContext |
open(int index,
InteractionContext last)
|
void |
provide(Void 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 CommandInvoker[] invokers
private Pipe.Invoker current
Constructor Detail |
---|
PipeLine(CommandInvoker[] invokers)
Method Detail |
---|
public void setSession(CommandContext session)
CommandInvoker
setSession
in interface CommandInvoker<Void,Chunk>
session
- the sessionpublic Class<Void> getConsumedType()
Consumer
getConsumedType
in interface Consumer<Void>
public Class<Chunk> getProducedType()
Producer
getProducedType
in interface Producer<Chunk,InteractionContext<Chunk>>
public void setPiped(boolean piped)
Producer
setPiped
in interface Producer<Chunk,InteractionContext<Chunk>>
piped
- the piped statuspublic void open(InteractionContext<Chunk> consumer)
Producer
open
in interface Producer<Chunk,InteractionContext<Chunk>>
consumer
- the consumerprivate InteractionContext open(int index, InteractionContext last)
public void provide(Void element) throws IOException
Consumer
provide
in interface Consumer<Void>
element
- the provided element
IOException
public void flush() throws IOException
flush
in interface Flushable
IOException
public void close()
Producer
close
in interface Closeable
close
in interface Producer<Chunk,InteractionContext<Chunk>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |