public interface Job
Modifier and Type | Method and Description |
---|---|
void |
cancelJob(Exception cause)
Triggers to cancel the
Job . |
boolean |
doJob(JobContext executionContext)
Executes the
Job . |
Job |
getNextJob()
Obtains the next
Job . |
Object |
getProcessIdentifier()
Obtains the identifier for the
ProcessState containing this
Job . |
void |
setNextJob(Job job)
Specifies the next
Job . |
boolean doJob(JobContext executionContext)
Executes the Job
.
The return indicates if the Job
has been completed and may be
released. Returning false
indicates this method must be
executed again (and possibly again and again) until it returns
true
.
executionContext
- Context for execution.true
if the Job
has completed.void cancelJob(Exception cause)
Job
.cause
- Cause providing reason for cancelling the Job
.sObject getProcessIdentifier()
Obtains the identifier for the ProcessState
containing this
Job
.
This allows the Team
executing the Job
to be aware of the
ProcessState
context in which the Job
is to be executed.
An example use would be embedding OfficeFloor
within an
Application Server and using this identifier and a
ProcessContextListener
to know the invoking Thread
for
interaction with JNDI.
ProcessState
containing this
Job
ProcessContextListener
void setNextJob(Job job)
Specifies the next Job
. This provides ability to create a linked
list of Job
instances.
Note there is no thread-safety guaranteed on this method.
job
- Job
that is next in the list to this Job
.getNextJob()
Job getNextJob()
Obtains the next Job
. This provides ability to create a linked
list of Job
instances.
Note there is no thread-safety guaranteed on this method.
Job
after this in the list.setNextJob(Job)
Copyright © 2005–2016. All rights reserved.