AbstractJobManager (Java Globus API)
org.globus.gatekeeper.jobmanager
Class AbstractJobManager
java.lang.Object
|
+--org.globus.gatekeeper.jobmanager.AbstractJobManager
All Implemented Interfaces: JobManager
Direct Known Subclasses: ForkJobManager , ShellJobManager
public abstract class AbstractJobManager extends java.lang.Objectimplements JobManager
AbstractJobManager is a base class from which all specific job managers
should inherit from. It provides all the basic functionality required
for a job manager.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.globus.gatekeeper.jobmanager.JobManager
cancel
appendStdout
protected boolean appendStdout
fileList
protected java.util.List fileList
_proxy
protected GlobusProxy _proxy
_status
protected int _status
_failureCode
protected int _failureCode
_callbackUrl
protected java.util.Hashtable _callbackUrl
allowStdioUrls
protected boolean allowStdioUrls
_outputFollower
protected Tail _outputFollower
_id
protected java.lang.String _id
_symbolTable
protected java.util.Properties _symbolTable
_jobDoneListener
protected JobDoneListener _jobDoneListener
called only when job is done or failed and
all after other listeners were notified of the state
_jobLogger
protected org.apache.log4j.Category _jobLogger
AbstractJobManager
public AbstractJobManager ()
initJobLogger
protected void initJobLogger ()
setLogFile
public void setLogFile ()
setLogFile
public void setLogFile (java.lang.String file)
setLogger
public void setLogger (org.apache.log4j.Category logger)
setCredentials
public void setCredentials (GlobusProxy credentials)
Specified by: setCredentials in interface JobManager
getCredentials
public GlobusProxy getCredentials ()
Specified by: getCredentials in interface JobManager
getID
public java.lang.String getID ()
Specified by: getID in interface JobManager
setID
public void setID (java.lang.String id)
Specified by: setID in interface JobManager
initSymbolTable
protected void initSymbolTable ()
setGlobusProperties
public static void setGlobusProperties (java.util.Map map)
getSymbolTable
public java.util.Properties getSymbolTable ()
Specified by: getSymbolTable in interface JobManager
getEnvironment
public java.util.Map getEnvironment ()
getEnvArray
public java.lang.String[] getEnvArray ()
getEnvArray
public java.lang.String[] getEnvArray (java.util.Map map)
saveDelegatedCredentials
protected void saveDelegatedCredentials ()
throws JobManagerException
JobManagerException
request
public void request (java.lang.String rslRequest)
throws JobManagerException
Specified by: request in interface JobManager
JobManagerException
request
public abstract void request (JobRequest request)
throws JobManagerException
JobManagerException
redirectThruFile
protected java.lang.String redirectThruFile (java.lang.String file,
int err)
throws JobManagerException
JobManagerException
openUrl
protected java.io.OutputStream openUrl (java.lang.String file,
int err)
throws JobManagerException
JobManagerException
getPath
protected java.lang.String getPath (java.lang.String localFile,
java.io.File dir)
openUrl
protected java.io.OutputStream openUrl (GlobusURL url)
throws java.lang.Exception
java.lang.Exception
signal
public void signal (int signal,
java.lang.String args)
throws JobManagerException
Description copied from interface: JobManager
Sends a signal to the JobManager.
Specified by: signal in interface JobManager
JobManagerException
addJobStatusListener
public void addJobStatusListener (JobStatusListener jobStatusListener)
Specified by: addJobStatusListener in interface JobManager
removeJobStatusListener
public void removeJobStatusListener (JobStatusListener jobStatusListener)
throws JobManagerException
Specified by: removeJobStatusListener in interface JobManager
JobManagerException
removeJobStatusListenerByID
public void removeJobStatusListenerByID (java.lang.String jobStatusListenerID)
throws JobManagerException
Specified by: removeJobStatusListenerByID in interface JobManager
JobManagerException
getStatus
public int getStatus ()
Provides the status of the job.
Specified by: getStatus in interface JobManager
Returns: the status of the job.
getFailureCode
public int getFailureCode ()
Provides the failure code or exit code of the job.
Specified by: getFailureCode in interface JobManager
Returns: the failure code or exit code of the job.
setStatus
public void setStatus (int status)
changes the old status to the new status and calls any required status
updates which are registered.
Parameters: status - the new status of the process.
fireStatusUpdate
public void fireStatusUpdate ()
dispose
protected void dispose ()
stageExecutable
public java.lang.String stageExecutable (java.lang.String url)
throws JobManagerException
JobManagerException
stageStdin
public java.lang.String stageStdin (java.lang.String url)
throws JobManagerException
JobManagerException
stageFile
protected java.lang.String stageFile (java.lang.String url)
throws java.net.MalformedURLException,
java.io.IOException,
UrlCopyException
java.net.MalformedURLException
java.io.IOException
UrlCopyException