public class ClosureInvoker extends CommandInvoker<Object,Object>
| Modifier and Type | Field and Description |
|---|---|
private groovy.lang.Closure |
closure
.
|
private CommandContext<? super Object> |
consumer
.
|
private Class<?> |
type
.
|
| Constructor and Description |
|---|
ClosureInvoker(groovy.lang.Closure closure) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the producer.
|
void |
flush()
Flush the stream.
|
Class<Object> |
getConsumedType()
Returns the class of the element generic type.
|
Class<Object> |
getProducedType()
Returns the class of the produced type.
|
void |
open(CommandContext<? super Object> consumer)
Open the producer with the specified consumer.
|
void |
provide(Object element)
Provide an element.
|
getKeyHandler, getScreenContext, invokeprivate final groovy.lang.Closure closure
private CommandContext<? super Object> consumer
public ClosureInvoker(groovy.lang.Closure closure)
public Class<Object> getProducedType()
Producerpublic Class<Object> getConsumedType()
Consumerpublic void provide(Object element) throws IOException, CommandException
Consumerprovide in interface Consumer<Object>provide in class CommandInvoker<Object,Object>element - the provided elementIOExceptionCommandExceptionpublic void open(CommandContext<? super Object> consumer)
Produceropen in interface Producer<Object,CommandContext<? super Object>>open in class CommandInvoker<Object,Object>consumer - the consumerpublic void flush() throws IOException
Consumerflush in interface Consumer<Object>flush in class CommandInvoker<Object,Object>IOException - any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.