|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JobContext
Interface defining a context object being passed through the launching pipeline providing useful information about the job and the environment to be launched.
Nested Class Summary | |
---|---|
static interface |
JobContext.ThrowableRunnable
A runnable-like interface that allows exception to be caught |
Method Summary | |
---|---|
org.apache.commons.vfs.FileObject |
getFileSystem()
get the file system associated with the job context |
MutableJobInstance |
getJobInstance()
the job instance associated with this job context |
org.apache.commons.logging.Log |
getLog()
get a Log associated with this job. |
boolean |
isInterrupted()
test whether this context has been interrupted |
boolean |
isRecovering()
test whether this context is recovering from a crash |
boolean |
runInterruptable(JobContext.ThrowableRunnable pRunnable)
run a block of code (i.e. |
boolean |
runInterruptable(java.lang.Runnable pRunnable)
run a block of code (i.e. |
void |
schedule(DRMConnector pConnector)
schedule the given DRMConnector for immediate execution in this job context for the current job |
void |
schedule(DRMConnector pConnector,
long pRepeatInterval)
schedule the given DRMConnector for repeated execution in this job context for the current job |
void |
schedule(DRMConnector pConnector,
java.lang.String pCronExpression)
schedule the given DRMConnector for repeated execution in this job context for the current job |
void |
schedule(java.lang.String pConnectorName)
schedule the given named DRMConnector for immediate execution in this job context for the current job |
void |
schedule(java.lang.String pConnectorName,
long pRepeatInterval)
schedule the given named DRMConnector for immediate execution in this job context for the current job |
void |
schedule(java.lang.String pConnectorName,
java.lang.String pCronExpression)
schedule the given named DRMConnector for immediate execution in this job context for the current job |
Methods inherited from interface org.icenigrid.gridsam.core.plugin.JobManagerContext |
---|
getDRMConnector, getJobInstanceStore, schedule, schedule, schedule, schedule, schedule, schedule, scheduleImmediately, unschedule |
Method Detail |
---|
boolean isInterrupted()
boolean isRecovering()
MutableJobInstance getJobInstance()
boolean runInterruptable(java.lang.Runnable pRunnable)
pRunnable
- the interruptable code
boolean runInterruptable(JobContext.ThrowableRunnable pRunnable) throws java.lang.Exception
pRunnable
- the interruptable code
java.lang.Exception
- the exception thrown by the ThrowableRunnableorg.apache.commons.vfs.FileObject getFileSystem() throws java.io.IOException
java.io.IOException
- if the file system cannot be retrievedvoid schedule(DRMConnector pConnector) throws JobManagerException
pConnector
- the DRMConnector
JobManagerException
- if the DRMConnector cannot be scheduledvoid schedule(java.lang.String pConnectorName) throws JobManagerException
pConnectorName
- the name of the DRMConnector resolvable by the context *
JobManagerException
- if the DRMConnector cannot be scheduledvoid schedule(DRMConnector pConnector, long pRepeatInterval) throws JobManagerException
pConnector
- the DRMConnectorpRepeatInterval
- the period between repeated execution
JobManagerException
- if the DRMConnector cannot be scheduledvoid schedule(java.lang.String pConnectorName, long pRepeatInterval) throws JobManagerException
pConnectorName
- the name of the DRMConnector resolvable by the contextpRepeatInterval
- the period between repeated execution
JobManagerException
- if the DRMConnector cannot be scheduledvoid schedule(DRMConnector pConnector, java.lang.String pCronExpression) throws java.text.ParseException, JobManagerException
pConnector
- the DRMConnectorpCronExpression
- the CRON job expression to specify the schedule
java.text.ParseException
- if the cron expression is invalid
JobManagerException
- if the DRMConnector cannot be scheduledvoid schedule(java.lang.String pConnectorName, java.lang.String pCronExpression) throws java.text.ParseException, JobManagerException
pConnectorName
- the name of the DRMConnector resolvable by the contextpCronExpression
- the CRON job expression to specify the schedule
java.text.ParseException
- if the cron expression is invalid
JobManagerException
- if the DRMConnector cannot be scheduledorg.apache.commons.logging.Log getLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |