public class PipeLine extends CommandInvoker<Void,Object>
Modifier and Type | Field and Description |
---|---|
private CommandContext<?> |
current
.
|
private CommandInvoker[] |
invokers
.
|
Constructor and Description |
---|
PipeLine(CommandInvoker[] invokers) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the producer.
|
void |
flush()
Flush the stream.
|
Class<Void> |
getConsumedType()
Returns the class of the element generic type.
|
KeyHandler |
getKeyHandler()
Return the key handler or null if the invoker cannot handler key events.
|
Class<Object> |
getProducedType()
Returns the class of the produced type.
|
void |
open(CommandContext<? super Object> consumer)
Open the producer with the specified consumer.
|
private CommandContext |
open(int index,
CommandContext last) |
void |
provide(Void element)
Provide an element.
|
getScreenContext, invoke
private final CommandInvoker[] invokers
private CommandContext<?> current
public PipeLine(CommandInvoker[] invokers)
public Class<Void> getConsumedType()
Consumer
public Class<Object> getProducedType()
Producer
public void open(CommandContext<? super Object> consumer) throws IOException, CommandException
Producer
open
in interface Producer<Object,CommandContext<? super Object>>
open
in class CommandInvoker<Void,Object>
consumer
- the consumerIOException
CommandException
private CommandContext open(int index, CommandContext last) throws IOException, CommandException
IOException
CommandException
public KeyHandler getKeyHandler()
CommandInvoker
getKeyHandler
in class CommandInvoker<Void,Object>
public void provide(Void element) throws IOException
Consumer
provide
in interface Consumer<Void>
provide
in class CommandInvoker<Void,Object>
element
- the provided elementIOException
public void flush() throws IOException
Consumer
flush
in interface Consumer<Void>
flush
in class CommandInvoker<Void,Object>
IOException
- any io exceptionpublic void close() throws IOException, CommandException
Producer
close
in interface Producer<Object,CommandContext<? super Object>>
close
in class CommandInvoker<Void,Object>
IOException
CommandException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.