|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.shell.impl.command.spi.CommandInvoker<C,P>
C - the consumed element generic typeP - the produced element generic typepublic abstract class CommandInvoker<C,P>
A command invoker is a filter for a CommandContext kind of consumer.
| Constructor Summary | |
|---|---|
CommandInvoker()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crsh.stream.Consumer |
|---|
getConsumedType |
| Methods inherited from interface org.crsh.stream.Producer |
|---|
getProducedType |
| Constructor Detail |
|---|
public CommandInvoker()
| Method Detail |
|---|
public final void invoke(CommandContext<? super P> consumer)
throws IOException,
CommandException
consumer - the consumer for this invocation
IOException - any io exception
CommandException - anything command exception
public abstract void flush()
throws IOException
Consumer
flush in interface Consumer<C>IOException - any io exception
public abstract void provide(C element)
throws IOException,
CommandException
Consumer
provide in interface Consumer<C>element - the provided element
IOException
CommandException
public abstract void open(CommandContext<? super P> consumer)
throws IOException,
CommandException
Producer
open in interface Producer<P,CommandContext<? super P>>consumer - the consumer
IOException
CommandException
public abstract void close()
throws IOException,
CommandException
Producer
close in interface Producer<P,CommandContext<? super P>>IOException
CommandExceptionpublic ScreenContext getScreenContext()
public KeyHandler getKeyHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||