org.crsh.shell.impl.command.pipeline
Class PipeLine
java.lang.Object
org.crsh.shell.impl.command.spi.CommandInvoker<Void,Object>
org.crsh.shell.impl.command.pipeline.PipeLine
- All Implemented Interfaces:
- Consumer<Void>, Filter<Void,Object,CommandContext<? super Object>>, Producer<Object,CommandContext<? super Object>>
-
public class PipeLine
- extends CommandInvoker<Void,Object>
-
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 CommandContext<?> current
-
.
PipeLine
public PipeLine(CommandInvoker[] invokers)
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<Object> getProducedType()
- Description copied from interface:
Producer
-
Returns the class of the produced type.
-
- Returns:
- the produced type
open
public void open(CommandContext<? super Object> consumer)
throws IOException,
CommandException
- Description copied from interface:
Producer
-
Open the producer with the specified consumer.
-
- Specified by:
open
in interface Producer<Object,CommandContext<? super Object>>
- Specified by:
open
in class CommandInvoker<Void,Object>
-
- Parameters:
consumer
- the consumer
- Throws:
IOException
CommandException
open
private CommandContext open(int index,
CommandContext last)
throws IOException,
CommandException
-
- Throws:
IOException
CommandException
getKeyHandler
public KeyHandler getKeyHandler()
- Description copied from class:
CommandInvoker
-
Return the key handler or null if the invoker cannot handler key events.
-
- Overrides:
getKeyHandler
in class CommandInvoker<Void,Object>
-
- Returns:
- the key handler
provide
public void provide(Void element)
throws IOException
- Description copied from interface:
Consumer
-
Provide an element.
-
- Specified by:
provide
in interface Consumer<Void>
- Specified by:
provide
in class CommandInvoker<Void,Object>
-
- Parameters:
element
- the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
- Description copied from interface:
Consumer
-
Flush the stream.
-
- Specified by:
flush
in interface Consumer<Void>
- Specified by:
flush
in class CommandInvoker<Void,Object>
-
- Throws:
IOException
- any io exception
close
public void close()
throws IOException,
CommandException
- Description copied from interface:
Producer
-
Close the producer.
-
- Specified by:
close
in interface Producer<Object,CommandContext<? super Object>>
- Specified by:
close
in class CommandInvoker<Void,Object>
-
- Throws:
IOException
CommandException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.