|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.buglabs.bug.base.ShellSession
public class ShellSession
Default implementation of ShellSession.
| Field Summary | |
|---|---|
static java.lang.String |
LT
|
static java.lang.String |
TERMINATOR
This terminator string is used to determine when content from the output stream is completed for a given command. |
| Constructor Summary | |
|---|---|
ShellSession(java.io.File root,
java.io.Writer out)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Terminate the session and free any resources. |
java.lang.String |
execute(java.lang.String command)
|
void |
execute(java.lang.String command,
ICommandResponseHandler handler)
Execute a command and pass in a ICommandResponseHandler to deal with the output. |
void |
execute(java.lang.String command,
java.lang.String terminator,
ICommandResponseHandler handler)
|
static java.lang.String |
getFilePath(java.lang.String file)
|
void |
interrupt()
Interrupt any running programs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TERMINATOR
public static final java.lang.String LT
| Constructor Detail |
|---|
public ShellSession(java.io.File root,
java.io.Writer out)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public static java.lang.String getFilePath(java.lang.String file)
throws java.io.IOException
java.io.IOException
public java.lang.String execute(java.lang.String command)
throws java.io.IOException
execute in interface IShellSessionjava.io.IOException - if any data on stderr is produced.
public void execute(java.lang.String command,
ICommandResponseHandler handler)
throws java.io.IOException
IShellSession
execute in interface IShellSessionjava.io.IOException
public void execute(java.lang.String command,
java.lang.String terminator,
ICommandResponseHandler handler)
throws java.io.IOException
java.io.IOExceptionpublic void interrupt()
IShellSession
interrupt in interface IShellSessionpublic void dispose()
IShellSession
dispose in interface IShellSession
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||