org.crsh.command
Class PipeCommand<C,P>

java.lang.Object
  extended by org.crsh.command.PipeCommand<C,P>
Type Parameters:
C - the consumed generic type
P - the produced generic type

public abstract class PipeCommand<C,P>
extends Object

A pipe command.


Field Summary
protected  InvocationContext<P> context
          .
 
Constructor Summary
PipeCommand()
           
 
Method Summary
 void close()
          Close pipe.
(package private)  void doOpen(InvocationContext<P> context)
           
 void flush()
          Flush pipe.
 boolean isPiped()
           
 void open()
          Open pipe.
 void provide(C element)
          Extends the throw clause of the Consumer.provide(Object) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected InvocationContext<P> context
.

Constructor Detail

PipeCommand

public PipeCommand()
Method Detail

isPiped

public final boolean isPiped()

doOpen

void doOpen(InvocationContext<P> context)

open

public void open()
          throws ScriptException
Open pipe.

Throws:
ScriptException

provide

public void provide(C element)
             throws ScriptException,
                    IOException
Extends the throw clause of the Consumer.provide(Object) method.

Parameters:
element - the provided element
Throws:
ScriptException - any script exception
IOException - any io exception

flush

public void flush()
           throws ScriptException,
                  IOException
Flush pipe.

Throws:
ScriptException - any script exception
IOException - any io exception

close

public void close()
           throws ScriptException
Close pipe.

Throws:
ScriptException - any script exception


Copyright © 2014 eXo Platform SAS. All Rights Reserved.