org.crsh.command.pipeline
Class PipeLine

java.lang.Object
  extended by org.crsh.command.CommandInvoker<Void,Chunk>
      extended by org.crsh.command.pipeline.PipeLine
All Implemented Interfaces:
Closeable, Flushable, Consumer<Void>, Filter<Void,Chunk,CommandContext<? super Chunk>>, Producer<Chunk,CommandContext<? super Chunk>>

public class PipeLine
extends CommandInvoker<Void,Chunk>


Field Summary
private  CommandContext<?> 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(CommandContext<? super Chunk> consumer)
          Open the producer with the specified consumer.
private  CommandContext open(int index, CommandContext last)
           
 void provide(Void element)
          Provide an element.
 
Methods inherited from class org.crsh.command.CommandInvoker
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

invokers

private final CommandInvoker[] invokers
.


current

private CommandContext<?> current
.

Constructor Detail

PipeLine

public PipeLine(CommandInvoker[] invokers)
Method Detail

getConsumedType

public Class<Void> getConsumedType()
Description copied from interface: Consumer
Returns the class of the element generic type.

Returns:
the consumed type

getProducedType

public Class<Chunk> getProducedType()
Description copied from interface: Producer
Returns the class of the produced type.

Returns:
the produced type

open

public void open(CommandContext<? super Chunk> consumer)
Description copied from interface: Producer
Open the producer with the specified consumer.

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.

Parameters:
element - the provided element
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: Producer
Close the producer.

Throws:
IOException - any io exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.