|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Job
A job is a single task to be done.
| Field Summary | |
|---|---|
static java.lang.String |
JOB_PRIORITY_PROPERTY
Constant used to determine when the priority property has changed. |
static java.lang.String |
JOB_STATE_PROPERTY
Constant used to determine when the state property has changed. |
static int |
MAX_PRIORITY
The possible maximum priority for an job. |
static int |
MIN_PRIORITY
The possible minimum priority for an job. |
static int |
STATE_ALREADY_PROCESSED
This job was already processed. |
static int |
STATE_ASSIGNED
The job is assigned to an worker thread. |
static int |
STATE_CLOSED
The job is closed and not longer in progress. |
static int |
STATE_ERROR
The job processing has been aborted by an error. |
static int |
STATE_FAILED
The job processing failed. |
static int |
STATE_FINISHED
The job finished without error. |
static int |
STATE_IGNORED
This job is set to ignored by an filter. |
static int |
STATE_IN_PROGRESS
The job processing is in progress. |
static int |
STATE_IN_PROGRESS_RETRY
The job processing is in retry progress. |
static int |
STATE_OPEN
The job is open and waits to be assigned. |
static int |
STATE_REOPEN
The job is closed but should be reopened |
| Method Summary | |
|---|---|
void |
abort()
Aborts the job when running. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pListener)
Adds a PropertyChangeListener to the listener list. |
Context |
getGroupContext()
The context for this job group. |
int |
getId()
Returns the unique id of this job. |
JobManager |
getJobManager()
The job manager the job is managed by. |
java.lang.String |
getName()
Gets the name of the job |
JobParameter |
getParameter(java.lang.String pKey)
Returns the parameter under the given key or null. |
java.util.List<JobParameter> |
getParameterList()
Get a list of all job parameter |
int |
getPriority()
The higher the number, the higher the priority, max is 999, min is 0 Default is 500 |
int |
getState()
Returns the current state of the Job. |
boolean |
isClosed()
Returns true when the job is closed. |
boolean |
isIgnoreFilter()
Returns true when the filter should not be applied for this job. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pListener)
Removes a PropertyChangeListener from the listener list. |
void |
run()
Starts the execution of the job. |
void |
setGroupContext(Context pContext)
Sets the context for this job group. |
void |
setId(int pJobId)
Sets the id of this job. |
void |
setIgnoreFilter(boolean pIgnoreFilter)
When set to true, the JobFilter will not filter out this job. |
void |
setJobManager(JobManager pJobManager)
Sets the jobManager for this job. |
void |
setName(java.lang.String pName)
Sets the name of the job |
void |
setParameter(JobParameter pParameter)
Set a parameter to the job |
void |
setPriority(int pPriority)
The higher the number, the higher the priority, max is 999, min is 0 Default is 500 |
void |
setState(int pState)
Sets the current state of the job. |
| Field Detail |
|---|
static final int STATE_OPEN
static final int STATE_ASSIGNED
static final int STATE_IN_PROGRESS
static final int STATE_IN_PROGRESS_RETRY
static final int STATE_CLOSED
static final int STATE_REOPEN
static final int STATE_IGNORED
static final int STATE_ALREADY_PROCESSED
static final int STATE_FAILED
static final int STATE_FINISHED
static final int STATE_ERROR
static final java.lang.String JOB_PRIORITY_PROPERTY
getPriority(),
addPropertyChangeListener(java.beans.PropertyChangeListener),
Constant Field Valuesstatic final java.lang.String JOB_STATE_PROPERTY
getState(),
addPropertyChangeListener(java.beans.PropertyChangeListener),
Constant Field Valuesstatic final int MAX_PRIORITY
static final int MIN_PRIORITY
| Method Detail |
|---|
void run()
throws java.lang.Exception
java.lang.Exceptionboolean isClosed()
JobManager getJobManager()
void setJobManager(JobManager pJobManager)
pJobManager - Context getGroupContext()
void setGroupContext(Context pContext)
pContext - the context the job belongs.boolean isIgnoreFilter()
void setIgnoreFilter(boolean pIgnoreFilter)
int getState()
void setState(int pState)
pState - int getPriority()
void setPriority(int pPriority)
pPriority - int getId()
void setId(int pJobId)
pJobId - java.lang.String getName()
void setName(java.lang.String pName)
pName - void setParameter(JobParameter pParameter)
pParameter - JobParameter getParameter(java.lang.String pKey)
pKey -
java.util.List<JobParameter> getParameterList()
void abort()
void addPropertyChangeListener(java.beans.PropertyChangeListener pListener)
pListener - The PropertyChangeListener to be addedJOB_PRIORITY_PROPERTY,
JOB_STATE_PROPERTYvoid removePropertyChangeListener(java.beans.PropertyChangeListener pListener)
pListener - The PropertyChangeListener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||