|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.processor.term.ProcessContext
class ProcessContext
| Field Summary | |
|---|---|
(package private) ShellProcess |
process
. |
(package private) Processor |
processor
. |
| Constructor Summary | |
|---|---|
ProcessContext(Processor processor,
ShellProcess process)
|
|
| Method Summary | |
|---|---|
void |
end(ShellResponse response)
This method is invoked when the process ends. |
void |
flush()
|
Class<Chunk> |
getConsumedType()
Returns the class of the element generic type. |
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)
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. |
void |
run()
|
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 Processor processor
final ShellProcess process
| Constructor Detail |
|---|
ProcessContext(Processor processor,
ShellProcess process)
| Method Detail |
|---|
public boolean takeAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
takeAlternateBuffer in interface InteractionContext<Chunk>IOException
public boolean releaseAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
releaseAlternateBuffer in interface InteractionContext<Chunk>IOExceptionpublic void run()
run in interface Runnablepublic int getWidth()
ScreenContext
getWidth in interface ScreenContext<Chunk>public int getHeight()
ScreenContext
getHeight in interface ScreenContext<Chunk>public String getProperty(String name)
InteractionContext
getProperty in interface InteractionContext<Chunk>name - the property name
public String readLine(String msg,
boolean echo)
InteractionContext
readLine in interface InteractionContext<Chunk>msg - the message to display before reading a lineecho - wether or not the line read should be echoed when typing
public Class<Chunk> getConsumedType()
Consumer
getConsumedType in interface Consumer<Chunk>
public void provide(Chunk element)
throws IOException
Consumer
provide in interface Consumer<Chunk>element - the provided element
IOException
public void flush()
throws IOException
flush in interface FlushableIOExceptionpublic void end(ShellResponse response)
ShellProcessContext
end in interface ShellProcessContextresponse - the shell response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||