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