class ProcessContext extends Object implements ShellProcessContext, Runnable
| Modifier and Type | Field and Description |
|---|---|
(package private) ShellProcess |
process
.
|
(package private) Processor |
processor
.
|
| Constructor and Description |
|---|
ProcessContext(Processor processor,
ShellProcess process) |
| Modifier and Type | Method and Description |
|---|---|
Appendable |
append(char c) |
Appendable |
append(CharSequence s) |
Appendable |
append(CharSequence csq,
int start,
int end) |
Screenable |
append(Style style) |
Screenable |
cls() |
void |
end(ShellResponse response)
This method is invoked when the process ends.
|
void |
flush()
Flush the stream.
|
int |
getHeight()
Returns the screen height in chars.
|
String |
getProperty(String name)
Returns a generic property, usually this property is resolved by the
shell client.
|
int |
getWidth()
Returns the screen width in chars.
|
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.
|
void |
run() |
boolean |
takeAlternateBuffer()
Take control of the alternate buffer.
|
final ShellProcess process
ProcessContext(Processor processor, ShellProcess process)
public boolean takeAlternateBuffer() throws IOException
InteractionContextScreenContext.flush() method
is invoked.takeAlternateBuffer in interface InteractionContextIOExceptionpublic boolean releaseAlternateBuffer() throws IOException
InteractionContextScreenContext.flush() method
is invoked.releaseAlternateBuffer in interface InteractionContextIOExceptionpublic int getWidth()
ScreenContextgetWidth in interface ScreenContextpublic int getHeight()
ScreenContextgetHeight in interface ScreenContextpublic String getProperty(String name)
InteractionContextgetProperty in interface InteractionContextname - the property namepublic String readLine(String msg, boolean echo)
InteractionContextreadLine in interface InteractionContextmsg - the message to display before reading a lineecho - wether or not the line read should be echoed when typingpublic Appendable append(char c) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(CharSequence s) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(CharSequence csq, int start, int end) throws IOException
append in interface AppendableIOExceptionpublic Screenable append(Style style) throws IOException
append in interface ScreenableIOExceptionpublic Screenable cls() throws IOException
cls in interface ScreenableIOExceptionpublic void flush() throws IOException
ScreenContextflush in interface ScreenContextIOException - any io exceptionpublic void end(ShellResponse response)
ShellProcessContextend in interface ShellProcessContextresponse - the shell responseCopyright © 2015 eXo Platform SAS. All Rights Reserved.