|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.ssh.term.inline.SSHInlineShellProcessContext
public class SSHInlineShellProcessContext
ShellProcessContext for SSH inline commands
Field Summary | |
---|---|
private SSHContext |
context . |
private PrintStream |
err . |
private CountDownLatch |
latch . |
private static String |
MSG . |
private boolean |
msgDone . |
private PrintStream |
out . |
private ShellProcess |
process . |
private ShellResponse |
response . |
Constructor Summary | |
---|---|
SSHInlineShellProcessContext(SSHContext context, ShellProcess process, PrintStream out, PrintStream err) |
Method Summary | |
---|---|
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. |
SSHInlineShellProcessContext |
execute() |
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. |
(package private) ShellResponse |
getResponse() |
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. |
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 |
---|
private static final String MSG
private boolean msgDone
private ShellResponse response
private final CountDownLatch latch
private final SSHContext context
private final ShellProcess process
private final PrintStream out
private final PrintStream err
Constructor Detail |
---|
SSHInlineShellProcessContext(SSHContext context, ShellProcess process, PrintStream out, PrintStream err)
Method Detail |
---|
public SSHInlineShellProcessContext execute()
public boolean takeAlternateBuffer()
InteractionContext
ScreenContext.flush()
method is invoked.
takeAlternateBuffer
in interface InteractionContext
public boolean releaseAlternateBuffer()
InteractionContext
ScreenContext.flush()
method is invoked.
releaseAlternateBuffer
in interface InteractionContext
public int getWidth()
ScreenContext
getWidth
in interface ScreenContext
public int getHeight()
ScreenContext
getHeight
in interface ScreenContext
public String getProperty(String name)
InteractionContext
getProperty
in interface InteractionContext
name
- the property namepublic String readLine(String msg, boolean echo)
InteractionContext
readLine
in interface InteractionContext
msg
- 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 Appendable
IOException
public Appendable append(CharSequence s) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Screenable append(Style style) throws IOException
append
in interface Screenable
IOException
public Screenable cls() throws IOException
cls
in interface Screenable
IOException
public void flush() throws IOException
ScreenContext
flush
in interface ScreenContext
IOException
- any io exceptionpublic void end(ShellResponse response)
ShellProcessContext
end
in interface ShellProcessContext
response
- the shell responseShellResponse getResponse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |