|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.gatekeeper.jobmanager.AbstractJobManager
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.
Field Summary | |
protected Hashtable |
_callbackUrl
|
protected GSSCredential |
_credential
|
protected int |
_failureCode
|
protected String |
_id
|
protected JobDoneListener |
_jobDoneListener
called only when job is done or failed and all after other listeners were notified of the state |
protected org.apache.log4j.Logger |
_jobLogger
|
protected Tail |
_outputFollower
|
protected int |
_status
|
protected Properties |
_symbolTable
|
protected boolean |
allowStdioUrls
|
protected boolean |
appendStdout
|
protected List |
fileList
|
Constructor Summary | |
AbstractJobManager()
|
Method Summary | |
void |
addJobStatusListener(JobStatusListener jobStatusListener)
|
protected void |
dispose()
|
void |
fireStatusUpdate()
|
GSSCredential |
getCredentials()
|
String[] |
getEnvArray()
|
String[] |
getEnvArray(Map map)
|
Map |
getEnvironment()
|
int |
getFailureCode()
Provides the failure code or exit code of the job. |
String |
getID()
|
protected String |
getPath(String localFile,
File dir)
|
int |
getStatus()
Provides the status of the job. |
Properties |
getSymbolTable()
|
protected void |
initJobLogger()
|
protected void |
initSymbolTable()
|
protected OutputStream |
openUrl(GlobusURL url)
|
protected OutputStream |
openUrl(String file,
int err)
|
protected String |
redirectThruFile(String file,
int err)
|
void |
removeJobStatusListener(JobStatusListener jobStatusListener)
|
void |
removeJobStatusListenerByID(String jobStatusListenerID)
|
abstract void |
request(JobRequest request)
|
void |
request(String rslRequest)
|
protected void |
saveDelegatedCredentials()
|
void |
setCredentials(GSSCredential credentials)
|
static void |
setGlobusProperties(Map map)
|
void |
setID(String id)
|
void |
setLogFile()
|
void |
setLogFile(String file)
|
void |
setLogger(org.apache.log4j.Logger logger)
|
void |
setStatus(int status)
changes the old status to the new status and calls any required status updates which are registered. |
void |
signal(int signal,
String args)
Sends a signal to the JobManager. |
String |
stageExecutable(String url)
|
protected String |
stageFile(String url)
|
String |
stageStdin(String url)
|
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 |
Field Detail |
protected boolean appendStdout
protected List fileList
protected GSSCredential _credential
protected int _status
protected int _failureCode
protected Hashtable _callbackUrl
protected boolean allowStdioUrls
protected Tail _outputFollower
protected String _id
protected Properties _symbolTable
protected JobDoneListener _jobDoneListener
protected org.apache.log4j.Logger _jobLogger
Constructor Detail |
public AbstractJobManager()
Method Detail |
protected void initJobLogger()
public void setLogFile()
public void setLogFile(String file)
public void setLogger(org.apache.log4j.Logger logger)
public void setCredentials(GSSCredential credentials)
setCredentials
in interface JobManager
public GSSCredential getCredentials()
getCredentials
in interface JobManager
public String getID()
getID
in interface JobManager
public void setID(String id)
setID
in interface JobManager
protected void initSymbolTable()
public static void setGlobusProperties(Map map)
public Properties getSymbolTable()
getSymbolTable
in interface JobManager
public Map getEnvironment()
public String[] getEnvArray()
public String[] getEnvArray(Map map)
protected void saveDelegatedCredentials() throws JobManagerException
JobManagerException
public void request(String rslRequest) throws JobManagerException
request
in interface JobManager
JobManagerException
public abstract void request(JobRequest request) throws JobManagerException
JobManagerException
protected String redirectThruFile(String file, int err) throws JobManagerException
JobManagerException
protected OutputStream openUrl(String file, int err) throws JobManagerException
JobManagerException
protected String getPath(String localFile, File dir)
protected OutputStream openUrl(GlobusURL url) throws Exception
Exception
public void signal(int signal, String args) throws JobManagerException
JobManager
signal
in interface JobManager
JobManagerException
public void addJobStatusListener(JobStatusListener jobStatusListener)
addJobStatusListener
in interface JobManager
public void removeJobStatusListener(JobStatusListener jobStatusListener) throws JobManagerException
removeJobStatusListener
in interface JobManager
JobManagerException
public void removeJobStatusListenerByID(String jobStatusListenerID) throws JobManagerException
removeJobStatusListenerByID
in interface JobManager
JobManagerException
public int getStatus()
getStatus
in interface JobManager
public int getFailureCode()
getFailureCode
in interface JobManager
public void setStatus(int status)
status
- the new status of the process.public void fireStatusUpdate()
protected void dispose()
public String stageExecutable(String url) throws JobManagerException
JobManagerException
public String stageStdin(String url) throws JobManagerException
JobManagerException
protected String stageFile(String url) throws MalformedURLException, IOException, UrlCopyException
MalformedURLException
IOException
UrlCopyException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |