|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.shell.impl.command.AbstractInvocationContext<Object> org.crsh.lang.impl.groovy.closure.PipeLineInvocationContext
class PipeLineInvocationContext
Field Summary | |
---|---|
(package private) InvocationContext<Object> |
outter . |
Constructor Summary | |
---|---|
PipeLineInvocationContext(InvocationContext<Object> outter) |
Method Summary | |
---|---|
Appendable |
append(char c) |
Screenable |
append(CharSequence s) |
Appendable |
append(CharSequence csq, int start, int end) |
Screenable |
append(Style style) |
void |
close() |
Screenable |
cls() |
void |
flush() Flush the stream. |
Map<String,Object> |
getAttributes() Returns the current attributes. |
Class<Object> |
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. |
void |
provide(Object element) Provide an element. |
String |
readLine(String msg, boolean echo) Display a message and read a line on the console, this method call can be blocking until the user provides a value. |
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 org.crsh.shell.impl.command.AbstractInvocationContext |
---|
leftShift |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final InvocationContext<Object> outter
Constructor Detail |
---|
PipeLineInvocationContext(InvocationContext<Object> outter)
Method Detail |
---|
public CommandInvoker<?,?> resolve(String s) throws CommandException
InvocationContext
s
- the command lineCommandException
- any command exceptionpublic int getWidth()
ScreenContext
public int getHeight()
ScreenContext
public boolean takeAlternateBuffer() throws IOException
InteractionContext
ScreenContext.flush()
method is invoked.
IOException
public boolean releaseAlternateBuffer() throws IOException
InteractionContext
ScreenContext.flush()
method is invoked.
IOException
public String getProperty(String propertyName)
InteractionContext
propertyName
- the property namepublic String readLine(String msg, boolean echo) throws IOException, InterruptedException
InteractionContext
msg
- the message to display before reading a lineecho
- wether or not the line read should be echoed when typingIOException
- any io exceptionInterruptedException
- the thread was interrupted while waiting for the user valuepublic RenderPrintWriter getWriter()
InvocationContext
public Class<Object> getConsumedType()
Consumer
public Screenable append(CharSequence s) throws IOException
IOException
public Appendable append(char c) throws IOException
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
IOException
public Screenable append(Style style) throws IOException
IOException
public Screenable cls() throws IOException
IOException
public void provide(Object element) throws Exception
Consumer
element
- the provided elementException
- any exceptionpublic void flush() throws IOException
Consumer
IOException
- any io exceptionpublic void close()
public Map<String,Object> getSession()
RuntimeContext
public Map<String,Object> getAttributes()
RuntimeContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |