|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.InvocationContextImpl<P>
class InvocationContextImpl<P>
| Field Summary | |
|---|---|
private ProducerContext<P> |
producerContext
. |
private RenderPrintWriter |
writer
. |
| Constructor Summary | |
|---|---|
InvocationContextImpl(ProducerContext<P> producerContext)
|
|
| Method Summary | |
|---|---|
void |
flush()
|
Map<String,Object> |
getAttributes()
Returns the current shell attributes. |
Class<P> |
getConsumedType()
Returns the class of the consumed type. |
int |
getHeight()
Returns the term 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 shell session. |
int |
getWidth()
Returns the term width in chars. |
RenderPrintWriter |
getWriter()
Returns the writer for the output. |
void |
provide(P element)
Provide an element. |
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console. |
CommandInvoker<?,?> |
resolve(String s)
Resolve a command invoker for the specified command line. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final ProducerContext<P> producerContext
private RenderPrintWriter writer
| Constructor Detail |
|---|
InvocationContextImpl(ProducerContext<P> producerContext)
| Method Detail |
|---|
public RenderPrintWriter getWriter()
InvocationContext
getWriter in interface InvocationContext<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 Class<P> getConsumedType()
Consumer
getConsumedType in interface Consumer<P>public String getProperty(String propertyName)
InteractionContext
getProperty in interface InteractionContextpropertyName - the property name
public String readLine(String msg,
boolean echo)
InteractionContext
readLine in interface InteractionContextmsg - the message to display before reading a lineecho - wether or not the line read should be echoed when typing
public int getWidth()
IOContext
getWidth in interface IOContext<P>public int getHeight()
IOContext
getHeight in interface IOContext<P>
public void provide(P element)
throws IOException
Pipe
provide in interface Pipe<P>element - the provided element
IOException
public void flush()
throws IOException
flush in interface FlushableIOExceptionpublic Map<String,Object> getSession()
SessionContext
getSession in interface SessionContextpublic Map<String,Object> getAttributes()
SessionContext
getAttributes in interface SessionContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||