C
- the consumed element generic typeP
- the produced element generic typepublic abstract class CommandInvoker<C,P> extends Object implements Filter<C,P,CommandContext<? super P>>
CommandContext
kind of consumer.Constructor and Description |
---|
CommandInvoker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Close the producer.
|
abstract void |
flush()
Flush the stream.
|
KeyHandler |
getKeyHandler()
Return the key handler or null if the invoker cannot handler key events.
|
ScreenContext |
getScreenContext()
Provide an opportunity for the command to implement screen context.
|
void |
invoke(CommandContext<? super P> consumer)
Invoke the command.
|
abstract void |
open(CommandContext<? super P> consumer)
Open the producer with the specified consumer.
|
abstract void |
provide(C element)
Provide an element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConsumedType
getProducedType
public CommandInvoker()
public final void invoke(CommandContext<? super P> consumer) throws IOException, CommandException
consumer
- the consumer for this invocationIOException
- any io exceptionCommandException
- anything command exceptionpublic abstract void flush() throws IOException
Consumer
flush
in interface Consumer<C>
IOException
- any io exceptionpublic abstract void provide(C element) throws IOException, CommandException
Consumer
provide
in interface Consumer<C>
element
- the provided elementIOException
CommandException
public abstract void open(CommandContext<? super P> consumer) throws IOException, CommandException
Producer
open
in interface Producer<P,CommandContext<? super P>>
consumer
- the consumerIOException
CommandException
public abstract void close() throws IOException, CommandException
Producer
close
in interface Producer<P,CommandContext<? super P>>
IOException
CommandException
public ScreenContext getScreenContext()
public KeyHandler getKeyHandler()
Copyright © 2015 eXo Platform SAS. All Rights Reserved.