|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SSHConsoleRemote
Basic interface to classes implementing a console to a remote command or shell.
Method Summary | |
---|---|
void |
changeStdOut(NonBlockingOutput out)
Changes the output stream where stdout is written to in the underlying session channel. |
void |
changeStdOut(java.io.OutputStream out)
Changes the output stream where stdout is written to in the underlying session channel. |
void |
close()
Closes the session channel. |
void |
close(boolean waitforcloseconfirm)
Closes the session channel. |
boolean |
command(java.lang.String command)
Runs single command on server. |
NonBlockingOutput |
getNBStdIn()
Gets the stdin stream of the underlying session channel. |
NonBlockingInput |
getNBStdOut()
Gets the stdout stream of the underlying session channel. |
java.io.OutputStream |
getStdIn()
Gets the stdin stream of the underlying session channel. |
java.io.InputStream |
getStdOut()
Gets the stdout stream of the underlying session channel. |
boolean |
shell()
Starts an interactive shell on the server, note that no PTY is allocated. |
Method Detail |
---|
boolean command(java.lang.String command)
Note, this will create an extra pair of threads to handle the data.
command
- command line to run
boolean shell()
void close()
void close(boolean waitforcloseconfirm)
void changeStdOut(java.io.OutputStream out) throws java.lang.IllegalArgumentException
Note that this method only works if the underlying session uses blocking streams and threads.
out
- new stdout stream
IllegalArgumetExcpetion
- if the underlying session uses
non-blocking IO
java.lang.IllegalArgumentException
java.io.OutputStream getStdIn()
Note that this method returns null if the underlying stream uses non-blocking io
java.io.InputStream getStdOut()
Note that this method returns null if the underlying stream uses non-blocking io
void changeStdOut(NonBlockingOutput out) throws java.lang.IllegalArgumentException
Note that this method only works if the underlying session uses non-blocking io.
out
- new stdout stream
IllegalArgumetExcpetion
- if the underlying session uses
blocking IO
java.lang.IllegalArgumentException
NonBlockingOutput getNBStdIn()
Note that this method returns null if the underlying stream uses blocking io
NonBlockingInput getNBStdOut()
Note that this method returns null if the underlying stream uses blocking io
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |