class JLineProcessContext extends Object implements ShellProcessContext
| Modifier and Type | Field and Description |
|---|---|
(package private) CountDownLatch |
latch
.
|
private static Character |
NO_ECHO
.
|
(package private) JLineProcessor |
processor
.
|
(package private) AtomicReference<ShellResponse> |
resp
.
|
| Constructor and Description |
|---|
JLineProcessContext(JLineProcessor processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
end(ShellResponse response)
This method is invoked when the process ends.
|
void |
flush() |
Class<Chunk> |
getConsumedType() |
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.
|
void |
provide(Chunk 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.
|
boolean |
takeAlternateBuffer()
Take control of the alternate buffer.
|
void |
write(Chunk chunk)
Write a chunk to the screen.
|
final JLineProcessor processor
final CountDownLatch latch
final AtomicReference<ShellResponse> resp
public JLineProcessContext(JLineProcessor processor)
public boolean takeAlternateBuffer()
InteractionContextFlushable.flush() method
is invoked.takeAlternateBuffer in interface InteractionContextpublic boolean releaseAlternateBuffer()
InteractionContextFlushable.flush() method
is invoked.releaseAlternateBuffer in interface InteractionContextpublic 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 Class<Chunk> getConsumedType()
public void write(Chunk chunk) throws IOException
ScreenContextwrite in interface ScreenContextchunk - the chunkIOException - any io exceptionpublic void provide(Chunk element) throws IOException
IOExceptionpublic void end(ShellResponse response)
ShellProcessContextend in interface ShellProcessContextresponse - the shell responseCopyright © 2013 eXo Platform SAS. All Rights Reserved.