org.crsh.shell.impl.command
Class PipeLine
java.lang.Object
org.crsh.shell.impl.command.PipeLine
- All Implemented Interfaces:
- Closeable, Flushable, CommandInvoker<Void,Chunk>, Consumer<Void>, Filter<Void,Chunk,CommandContext<Chunk>>, Producer<Chunk,CommandContext<Chunk>>
-
class PipeLine
- extends Object
-
- implements CommandInvoker<Void,Chunk>
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invokers
private final CommandInvoker[] invokers
-
.
current
private Pipe current
-
.
PipeLine
PipeLine(CommandInvoker[] invokers)
getConsumedType
public Class<Void> getConsumedType()
- Description copied from interface:
Consumer
-
Returns the class of the element generic type.
-
- Specified by:
getConsumedType
in interface Consumer<Void>
-
- Returns:
- the consumed type
getProducedType
public Class<Chunk> getProducedType()
- Description copied from interface:
Producer
-
Returns the class of the produced type.
-
- Specified by:
getProducedType
in interface Producer<Chunk,CommandContext<Chunk>>
-
- Returns:
- the produced type
open
public void open(CommandContext<Chunk> consumer)
- Description copied from interface:
Producer
-
Open the producer with the specified consumer.
-
- Specified by:
open
in interface Producer<Chunk,CommandContext<Chunk>>
-
- Parameters:
consumer
- the consumer
open
private CommandContext open(int index,
CommandContext last)
-
-
provide
public void provide(Void element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Specified by:
provide
in interface Consumer<Void>
-
- Parameters:
element
- the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
-
- Specified by:
flush
in interface Flushable
-
- Throws:
IOException
close
public void close()
throws IOException
- Description copied from interface:
Producer
-
Close the producer.
-
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface Producer<Chunk,CommandContext<Chunk>>
-
- Throws:
IOException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.