Class ExampleCommand
java.lang.Object
com.maverick.sshd.platform.ExecutableCommand
ExampleCommand
public class ExampleCommand
- extends ExecutableCommand
A simple demonstration of an executable command that simply prints out the
currently logged on users.
- Author:
- Lee David Painter
|
Method Summary |
boolean |
createProcess(String cmd,
Map environment)
Here you process the command and get ready to execute but DO NOT perform
any IO yet, wait for onStart() |
int |
getExitCode()
|
void |
kill()
|
void |
onStart()
The session is now open so you can perform all the IO you want but DONT
block this method; if you have lots of interaction you will need to start
a thread or override the processStdinData method to receive notification
of data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExampleCommand
public ExampleCommand()
getExitCode
public int getExitCode()
- Specified by:
getExitCode in class ExecutableCommand
kill
public void kill()
- Specified by:
kill in class ExecutableCommand
createProcess
public boolean createProcess(String cmd,
Map environment)
- Here you process the command and get ready to execute but DO NOT perform
any IO yet, wait for onStart()
- Specified by:
createProcess in class ExecutableCommand
- Parameters:
cmd - environment -
- Returns:
onStart
public void onStart()
- The session is now open so you can perform all the IO you want but DONT
block this method; if you have lots of interaction you will need to start
a thread or override the processStdinData method to receive notification
of data.
- Specified by:
onStart in class ExecutableCommand
Copyright © 2012. All Rights Reserved.