|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.lang.groovy.command.InnerInvocationContext<P>
class InnerInvocationContext<P>
| Field Summary | |
|---|---|
(package private) Consumer<P> |
consumer
. |
(package private) InvocationContext<?> |
outter
. |
private boolean |
piped
. |
private RenderPrintWriter |
writer
. |
| Constructor Summary | |
|---|---|
InnerInvocationContext(InvocationContext<?> outter,
Consumer<P> consumer,
boolean piped)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
Map<String,Object> |
getAttributes()
Returns the current attributes. |
Class<P> |
getConsumedType()
Returns the class of the element generic type. |
int |
getHeight()
Returns the screen height in chars. |
String |
getProperty(String propertyName)
Returns a generic property, usually this property is resolved by the shell client. |
Map<String,Object> |
getSession()
Returns the current session. |
int |
getWidth()
Returns the screen width in chars. |
RenderPrintWriter |
getWriter()
Returns the writer for the output. |
boolean |
isPiped()
|
void |
provide(P element)
Provide an element. |
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console. |
boolean |
releaseAlternateBuffer()
Release control of the alternate buffer. |
CommandInvoker<?,?> |
resolve(String s)
Resolve a command invoker for the specified command line. |
boolean |
takeAlternateBuffer()
Take control of the alternate buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final InvocationContext<?> outter
final Consumer<P> consumer
private RenderPrintWriter writer
private final boolean piped
| Constructor Detail |
|---|
InnerInvocationContext(InvocationContext<?> outter,
Consumer<P> consumer,
boolean piped)
| Method Detail |
|---|
public boolean isPiped()
isPiped in interface CommandContext<P>
public CommandInvoker<?,?> resolve(String s)
throws ScriptException,
IOException
InvocationContext
resolve in interface InvocationContext<P>s - the command line
ScriptException - any script exception
IOException - any io exceptionpublic int getWidth()
ScreenContext
getWidth in interface ScreenContext<P>public int getHeight()
ScreenContext
getHeight in interface ScreenContext<P>
public boolean takeAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
takeAlternateBuffer in interface InteractionContext<P>IOException
public boolean releaseAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
releaseAlternateBuffer in interface InteractionContext<P>IOExceptionpublic String getProperty(String propertyName)
InteractionContext
getProperty in interface InteractionContext<P>propertyName - the property name
public String readLine(String msg,
boolean echo)
InteractionContext
readLine in interface InteractionContext<P>msg - the message to display before reading a lineecho - wether or not the line read should be echoed when typing
public RenderPrintWriter getWriter()
InvocationContext
getWriter in interface InvocationContext<P>public Class<P> getConsumedType()
Consumer
getConsumedType in interface Consumer<P>
public void provide(P element)
throws IOException
Consumer
provide in interface Consumer<P>element - the provided element
IOException
public void flush()
throws IOException
flush in interface FlushableIOException
public void close()
throws IOException
close in interface CloseableIOExceptionpublic Map<String,Object> getSession()
RuntimeContext
getSession in interface RuntimeContextpublic Map<String,Object> getAttributes()
RuntimeContext
getAttributes in interface RuntimeContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||