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 Object implements 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 List fileList
_credential
protected GSSCredential _credential
_status
protected int _status
_failureCode
protected int _failureCode
_callbackUrl
protected Hashtable _callbackUrl
allowStdioUrls
protected boolean allowStdioUrls
_outputFollower
protected Tail _outputFollower
_id
protected String _id
_symbolTable
protected 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.Logger _jobLogger
AbstractJobManager
public AbstractJobManager ()
initJobLogger
protected void initJobLogger ()
setLogFile
public void setLogFile ()
setLogFile
public void setLogFile (String file)
setLogger
public void setLogger (org.apache.log4j.Logger logger)
setCredentials
public void setCredentials (GSSCredential credentials)
Specified by: setCredentials in interface JobManager
getCredentials
public GSSCredential getCredentials ()
Specified by: getCredentials in interface JobManager
getID
public String getID ()
Specified by: getID in interface JobManager
setID
public void setID (String id)
Specified by: setID in interface JobManager
initSymbolTable
protected void initSymbolTable ()
setGlobusProperties
public static void setGlobusProperties (Map map)
getSymbolTable
public Properties getSymbolTable ()
Specified by: getSymbolTable in interface JobManager
getEnvironment
public Map getEnvironment ()
getEnvArray
public String [] getEnvArray ()
getEnvArray
public String [] getEnvArray (Map map)
saveDelegatedCredentials
protected void saveDelegatedCredentials ()
throws JobManagerException
Throws:
JobManagerException
request
public void request (String rslRequest)
throws JobManagerException
Specified by: request in interface JobManager
Throws:
JobManagerException
request
public abstract void request (JobRequest request)
throws JobManagerException
Throws:
JobManagerException
redirectThruFile
protected String redirectThruFile (String file,
int err)
throws JobManagerException
Throws:
JobManagerException
openUrl
protected OutputStream openUrl (String file,
int err)
throws JobManagerException
Throws:
JobManagerException
getPath
protected String getPath (String localFile,
File dir)
openUrl
protected OutputStream openUrl (GlobusURL url)
throws Exception
Throws:
Exception
signal
public void signal (int signal,
String args)
throws JobManagerException
Description copied from interface: JobManager
Sends a signal to the JobManager.
Specified by: signal in interface JobManager
Throws:
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
Throws:
JobManagerException
removeJobStatusListenerByID
public void removeJobStatusListenerByID (String jobStatusListenerID)
throws JobManagerException
Specified by: removeJobStatusListenerByID in interface JobManager
Throws:
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 String stageExecutable (String url)
throws JobManagerException
Throws:
JobManagerException
stageStdin
public String stageStdin (String url)
throws JobManagerException
Throws:
JobManagerException
stageFile
protected String stageFile (String url)
throws MalformedURLException ,
IOException ,
UrlCopyException
Throws:
MalformedURLException
IOException
UrlCopyException