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 SSHConnectionm_Connectionthe ssh connection to use.protected BaseHostnamem_Hostthe host that sent the jobs in the first place.protected Filem_RemoteFilethe 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, m_Terminating
-
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 protectedRemoteJobRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(Job j, JobResult jr)Ignored.voiddefineOptions()Adds options to the internal list of options.protected StringdoStart()Performing actual start up.protected StringdoStop()Performing actual stop.protected StringdoTerminate(boolean wait)Performing actual terminate up.protected FilegetDefaultRemoteFile()Returns the default remote file.BaseHostnamegetHost()Returns the host to connect to.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.FilegetRemoteFile()Returns the remote file for the executed jobs.StringglobalInfo()Returns a string describing the object.StringhostTipText()Returns the tip text for this property.protected voidinitialize()Initializes the members.protected StringpreStart()Before actual start up.StringremoteFileTipText()Returns the tip text for this property.voidsetHost(BaseHostname value)Sets the host to connect to.voidsetRemoteFile(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:AbstractOptionHandlerReturns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractMetaJobRunner
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein 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:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractMetaJobRunner- Returns:
- null if no info available, otherwise short string
-
preStart
protected String preStart()
Before actual start up.- Overrides:
preStartin classAbstractMetaJobRunner- Returns:
- null if successful, otherwise error message
-
doStart
protected String doStart()
Performing actual start up. Only gets executed ifpreStart()was successful.- Specified by:
doStartin classAbstractJobRunner- Returns:
- null if successful, otherwise error message
- See Also:
AbstractJobRunner.preStart()
-
doStop
protected String doStop()
Performing actual stop.- Specified by:
doStopin classAbstractJobRunner- Returns:
- null if successful, otherwise error message
-
doTerminate
protected String doTerminate(boolean wait)
Performing actual terminate up.- Specified by:
doTerminatein classAbstractJobRunner- Parameters:
wait- whether to wait for the jobs to finish- Returns:
- null if successful, otherwise error message
-
-