|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.inca.agent.AccessMethod
edu.sdsc.inca.agent.access.Sleep
public class Sleep
Used for testing to make sure the ReporterManagerStarter class handles interrupts correctly. Can be configured to have the run method sleep on the nth call so it can be interrupted and tested to see if the run method handles the interrupt correctly.
| Field Summary | |
|---|---|
java.lang.String |
lastCommand
|
int |
numSkips
|
int |
sleepOnNthTime
|
int |
sleepPeriod
|
| Constructor Summary | |
|---|---|
Sleep(java.lang.String resource,
edu.sdsc.inca.util.ResourcesWrapper resources)
Create a interrupt manual process. |
|
| Method Summary | |
|---|---|
void |
get(java.lang.String remoteFile,
java.lang.String localDir)
Log the remote file that would be transferred to a directory on the local machine. |
boolean |
isActive()
Checks to see if the current ssh session is active. |
void |
put(java.lang.String localFile,
java.lang.String remoteDir)
Log the file that would be transferred to a directory on a remote machine . |
AccessMethodOutput |
run(java.lang.String executable,
java.lang.String[] arguments,
java.lang.String stdin,
java.lang.String directory)
Log the command that should be executed on the remote machine. |
void |
start(java.lang.String executable,
java.lang.String[] arguments,
java.lang.String stdin,
java.lang.String directory)
Start a process on a remote machine. |
void |
stop()
Just log that the process needs to be stopped. |
| Methods inherited from class edu.sdsc.inca.agent.AccessMethod |
|---|
create, get, prependHome, put, run, run, start, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int sleepPeriod
public int sleepOnNthTime
public int numSkips
public java.lang.String lastCommand
| Constructor Detail |
|---|
public Sleep(java.lang.String resource,
edu.sdsc.inca.util.ResourcesWrapper resources)
resource - The name of the resource to start the process onresources - The resource configuration information.| Method Detail |
|---|
public void get(java.lang.String remoteFile,
java.lang.String localDir)
throws AccessMethodException
get in class AccessMethodremoteFile - Path to the remote file that will be transferedlocalDir - Path to the directory on the local machine where
the remote file will be placed
AccessMethodException - if unable to fetch remote file
public void put(java.lang.String localFile,
java.lang.String remoteDir)
throws AccessMethodException
put in class AccessMethodlocalFile - Path to the local file that will be transferedremoteDir - Path to the directory on the remote machine where
the local file will be placed
AccessMethodException - if unable to transfer remote file
public AccessMethodOutput run(java.lang.String executable,
java.lang.String[] arguments,
java.lang.String stdin,
java.lang.String directory)
throws java.lang.InterruptedException
run in class AccessMethodexecutable - Path to the remote executable.arguments - Contains the arguments that should be passed to the
executablestdin - A string that will be passedd in as stdin to the process
when it is starteddirectory - Path to the directory where the process will be executed
from
java.lang.InterruptedException - if interrupted while running remote process
public void start(java.lang.String executable,
java.lang.String[] arguments,
java.lang.String stdin,
java.lang.String directory)
start in class AccessMethodexecutable - Path to the remote executable.arguments - Contains the arguments that should be passed to the
executabledirectory - Path to the directory where the process will be executedstdin - A string that will be passedd in as stdin to the process
when it is started
public void stop()
throws AccessMethodException
stop in class AccessMethodAccessMethodException
public boolean isActive()
throws AccessMethodException
isActive in class AccessMethodAccessMethodException - if unable to determine if process is active
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||