Package adams.multiprocess
Class ScpJobRunner.RemoteJobRunner
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.multiprocess.AbstractJobRunner
-
- adams.multiprocess.AbstractMetaJobRunner
-
- adams.multiprocess.ScpJobRunner.RemoteJobRunner
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,Pausable
,QuickInfoSupporter
,SizeOfHandler
,JobRunner
,Serializable
- Enclosing class:
- ScpJobRunner
protected static class ScpJobRunner.RemoteJobRunner extends AbstractMetaJobRunner
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SSHConnection
m_Connection
the ssh connection to use.protected BaseHostname
m_Host
the host that sent the jobs in the first place.protected File
m_RemoteFile
the remote file to serialize the unexecuted jobs to.-
Fields inherited from class adams.multiprocess.AbstractMetaJobRunner
m_ActualJobRunner, m_JobCompleteListeners, m_JobRunner, m_Jobs
-
Fields inherited from class adams.multiprocess.AbstractJobRunner
m_FlowContext, m_Paused, m_Running
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RemoteJobRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(Job j, JobResult jr)
Ignored.void
defineOptions()
Adds options to the internal list of options.protected String
doStart()
Performing actual start up.protected String
doStop()
Performing actual stop.protected String
doTerminate(boolean wait)
Performing actual terminate up.protected File
getDefaultRemoteFile()
Returns the default remote file.BaseHostname
getHost()
Returns the host to connect to.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.File
getRemoteFile()
Returns the remote file for the executed jobs.String
globalInfo()
Returns a string describing the object.String
hostTipText()
Returns the tip text for this property.protected void
initialize()
Initializes the members.protected String
preStart()
Before actual start up.String
remoteFileTipText()
Returns the tip text for this property.void
setHost(BaseHostname value)
Sets the host to connect to.void
setRemoteFile(File value)
Sets the remote file for the executed jobs.-
Methods inherited from class adams.multiprocess.AbstractMetaJobRunner
add, add, addJobCompleteListener, cleanUp, clear, getDefaultJobRunner, getJobRunner, getJobs, getTransferJobCompleteListeners, jobRunnerTipText, newActualJobRunner, removeJobCompleteListener, setJobRunner
-
Methods inherited from class adams.multiprocess.AbstractJobRunner
getFlowContext, isPaused, isRunning, pauseExecution, postStart, postStop, postTerminate, preStop, preTerminate, resumeExecution, setFlowContext, start, stop, terminate, terminate
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Host
protected BaseHostname m_Host
the host that sent the jobs in the first place.
-
m_RemoteFile
protected File m_RemoteFile
the remote file to serialize the unexecuted jobs to.
-
m_Connection
protected transient SSHConnection m_Connection
the ssh connection to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Description copied from class:AbstractOptionHandler
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractMetaJobRunner
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractMetaJobRunner
-
setHost
public void setHost(BaseHostname value)
Sets the host to connect to.- Parameters:
value
- the host name/ip:port
-
getHost
public BaseHostname getHost()
Returns the host to connect to.- Returns:
- the host name/ip:port
-
hostTipText
public String hostTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultRemoteFile
protected File getDefaultRemoteFile()
Returns the default remote file.- Returns:
- the remote file
-
setRemoteFile
public void setRemoteFile(File value)
Sets the remote file for the executed jobs.- Parameters:
value
- the remote file
-
getRemoteFile
public File getRemoteFile()
Returns the remote file for the executed jobs.- Returns:
- the remote file
-
remoteFileTipText
public String remoteFileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractMetaJobRunner
- Returns:
- null if no info available, otherwise short string
-
preStart
protected String preStart()
Before actual start up.- Overrides:
preStart
in classAbstractMetaJobRunner
- Returns:
- null if successful, otherwise error message
-
doStart
protected String doStart()
Performing actual start up. Only gets executed ifpreStart()
was successful.- Specified by:
doStart
in classAbstractJobRunner
- Returns:
- null if successful, otherwise error message
- See Also:
AbstractJobRunner.preStart()
-
doStop
protected String doStop()
Performing actual stop.- Specified by:
doStop
in classAbstractJobRunner
- Returns:
- null if successful, otherwise error message
-
doTerminate
protected String doTerminate(boolean wait)
Performing actual terminate up.- Specified by:
doTerminate
in classAbstractJobRunner
- Parameters:
wait
- whether to wait for the jobs to finish- Returns:
- null if successful, otherwise error message
-
-