org.jbpm.env.session
Class Job<T>

java.lang.Object
  extended by org.jbpm.env.session.Job<T>
All Implemented Interfaces:
java.io.Serializable, Command<T>
Direct Known Subclasses:
Message, Timer

public abstract class Job<T>
extends java.lang.Object
implements Command<T>, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  long dbid
           
protected  int dbversion
           
protected  java.util.Date dueDate
          date until which the command should not be executed this date is set to the current time It should be modified only for timers Warning: if you modify this, be sure to wake the JobExecutor when the job is supposed to be executed
protected  java.lang.String exception
          stack trace of the exception that occurred during command execution.
protected  ExecutionImpl execution
          the execution (if any) for this job
protected  boolean isExclusive
          specifies if this job can be executed concurrently with other jobs for the same execution.
protected  boolean isSuspended
          suspended jobs will not execute.
protected  java.util.Date lockExpirationTime
          the time the lock on this job expires.
protected  java.lang.String lockOwner
          name of the job executor name that has locked this job.
protected  ExecutionImpl processInstance
          the process instance
protected  int retries
          number of attempts left to try.
 
Constructor Summary
Job()
           
Job(ExecutionImpl execution)
           
 
Method Summary
 long getDbid()
           
 java.util.Date getDueDate()
           
 java.lang.String getException()
           
 ExecutionImpl getExecution()
           
 java.util.Date getLockExpirationTime()
           
 java.lang.String getLockOwner()
           
 ExecutionImpl getProcessInstance()
           
 int getRetries()
           
 boolean isExclusive()
           
 boolean isSuspended()
           
 void setDbid(long id)
           
 void setDueDate(java.util.Date dueDate)
           
 void setException(java.lang.String exception)
           
 void setExclusive(boolean isExclusive)
           
 void setLockExpirationTime(java.util.Date lockExpirationTime)
           
 void setLockOwner(java.lang.String jobExecutorName)
           
 void setRetries(int retries)
           
 void setSuspended(boolean isSuspended)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.client.Command
execute
 

Field Detail

dbid

protected long dbid

dbversion

protected int dbversion

dueDate

protected java.util.Date dueDate
date until which the command should not be executed this date is set to the current time It should be modified only for timers Warning: if you modify this, be sure to wake the JobExecutor when the job is supposed to be executed


isSuspended

protected boolean isSuspended
suspended jobs will not execute.


isExclusive

protected boolean isExclusive
specifies if this job can be executed concurrently with other jobs for the same execution.


lockOwner

protected java.lang.String lockOwner
name of the job executor name that has locked this job.


lockExpirationTime

protected java.util.Date lockExpirationTime
the time the lock on this job expires.


exception

protected java.lang.String exception
stack trace of the exception that occurred during command execution.


retries

protected int retries
number of attempts left to try. Should be decremented each time an exception occurs during command execution.


execution

protected ExecutionImpl execution
the execution (if any) for this job


processInstance

protected ExecutionImpl processInstance
the process instance

Constructor Detail

Job

public Job()

Job

public Job(ExecutionImpl execution)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDbid

public long getDbid()

setDbid

public void setDbid(long id)

getLockOwner

public java.lang.String getLockOwner()

isSuspended

public boolean isSuspended()

getDueDate

public java.util.Date getDueDate()

setDueDate

public void setDueDate(java.util.Date dueDate)

getException

public java.lang.String getException()

getRetries

public int getRetries()

isExclusive

public boolean isExclusive()

getExecution

public ExecutionImpl getExecution()

setException

public void setException(java.lang.String exception)

setExclusive

public void setExclusive(boolean isExclusive)

setLockOwner

public void setLockOwner(java.lang.String jobExecutorName)

setRetries

public void setRetries(int retries)

setSuspended

public void setSuspended(boolean isSuspended)

getProcessInstance

public ExecutionImpl getProcessInstance()

getLockExpirationTime

public java.util.Date getLockExpirationTime()

setLockExpirationTime

public void setLockExpirationTime(java.util.Date lockExpirationTime)