org.gridbus.broker.farming.common.dispatchers
Class SSHDispatcher
java.lang.Object
org.gridbus.broker.farming.common.dispatchers.SSHDispatcher
- All Implemented Interfaces:
- java.io.Serializable, Dispatcher
public class SSHDispatcher
- extends java.lang.Object
- implements Dispatcher
- Author:
- mtc
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSHDispatcher
public SSHDispatcher(java.lang.String host,
java.lang.String stagingDir,
java.lang.String workingDir,
SimpleCredential cred)
- Parameters:
host
- stagingDir
- cred
-
submit
public java.lang.Object submit(java.lang.String scriptFileName)
throws java.lang.Exception
- Parameters:
scriptFileName
-
- Returns:
-
- Throws:
java.lang.Exception
stageIn
public void stageIn(java.lang.String src,
java.lang.String dest)
throws java.lang.Exception
- Specified by:
stageIn
in interface Dispatcher
- Parameters:
src
- -- local file pathdest
- -- remote file path
- Throws:
java.lang.Exception
- See Also:
Dispatcher.stageIn(java.lang.String, java.lang.String)
stageInData
public void stageInData(java.lang.String src,
java.lang.String dest)
throws java.lang.Exception
- Specified by:
stageInData
in interface Dispatcher
- Throws:
java.lang.Exception
- See Also:
Dispatcher.stageInData(java.lang.String, java.lang.String)
stageOut
public void stageOut(java.lang.String src,
java.lang.String dest)
throws java.lang.Exception
- Specified by:
stageOut
in interface Dispatcher
- Parameters:
src
- -- remote file pathdest
- -- local file path
- Throws:
java.lang.Exception
- See Also:
Dispatcher.stageOut(java.lang.String, java.lang.String)
stageOutData
public void stageOutData(java.lang.String src,
java.lang.String dest)
throws java.lang.Exception
- Specified by:
stageOutData
in interface Dispatcher
- Throws:
java.lang.Exception
- See Also:
Dispatcher.stageOutData(java.lang.String, java.lang.String)
executeAndGetResult
public java.io.InputStream executeAndGetResult(java.lang.String cmd)
throws java.lang.Exception
- Specified by:
executeAndGetResult
in interface Dispatcher
- Returns:
-
- Throws:
java.lang.Exception
- See Also:
Dispatcher.executeCmd(java.lang.String)
executeCmd
public void executeCmd(java.lang.String cmd)
throws java.lang.Exception
- Specified by:
executeCmd
in interface Dispatcher
- Throws:
java.lang.Exception
getInputPath
public java.lang.String getInputPath()
- Specified by:
getInputPath
in interface Dispatcher
- Returns:
- See Also:
Dispatcher.getInputPath()
getStagingDir
public java.lang.String getStagingDir()
- Specified by:
getStagingDir
in interface Dispatcher
- Returns:
- See Also:
Dispatcher.getStagingDir()
detectFile
public boolean detectFile(java.lang.String filename,
int timeoutMillis)
- Detects the existence of the remote file.
Returns true, if the file exists, false otherwise.
- Specified by:
detectFile
in interface Dispatcher
- Parameters:
filename
- timeoutMillis
-
- Returns:
getDispatcherType
public java.lang.String getDispatcherType()
- Specified by:
getDispatcherType
in interface Dispatcher
- Returns:
- See Also:
Dispatcher.getDispatcherType()
shutdown
public void shutdown()
- Specified by:
shutdown
in interface Dispatcher
- See Also:
Dispatcher.shutdown()