org.ofbiz.service.job
Class PersistedServiceJob

java.lang.Object
  extended by org.ofbiz.service.job.AbstractJob
      extended by org.ofbiz.service.job.GenericServiceJob
          extended by org.ofbiz.service.job.PersistedServiceJob
All Implemented Interfaces:
java.io.Serializable, Job

public class PersistedServiceJob
extends GenericServiceJob

Entity Service Job - Store => Schedule => Run

See Also:
Serialized Form

Field Summary
static java.lang.String module
           
 
Fields inherited from class org.ofbiz.service.job.GenericServiceJob
dctx, requester
 
Fields inherited from class org.ofbiz.service.job.AbstractJob
runtime, sequence
 
Constructor Summary
PersistedServiceJob(DispatchContext dctx, GenericValue jobValue, GenericRequester req)
          Creates a new PersistedServiceJob
 
Method Summary
protected  void failed(java.lang.Throwable t)
          Method is called when the service fails.
protected  void finish()
          Method is called after the service has finished.
protected  java.util.Map<java.lang.String,java.lang.Object> getContext()
          Gets the context for the service invocation.
protected  java.lang.String getServiceName()
          Gets the name of the service as defined in the definition file.
protected  void init()
          Method is called prior to running the service.
 void queue()
          Flags this job as 'is-queued'
 
Methods inherited from class org.ofbiz.service.job.GenericServiceJob
exec
 
Methods inherited from class org.ofbiz.service.job.AbstractJob
getJobId, getJobName, getRuntime, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module
Constructor Detail

PersistedServiceJob

public PersistedServiceJob(DispatchContext dctx,
                           GenericValue jobValue,
                           GenericRequester req)
Creates a new PersistedServiceJob

Parameters:
dctx -
jobValue -
req -
Method Detail

queue

public void queue()
           throws InvalidJobException
Description copied from class: AbstractJob
Flags this job as 'is-queued'

Specified by:
queue in interface Job
Overrides:
queue in class AbstractJob
Throws:
InvalidJobException

init

protected void init()
             throws InvalidJobException
Description copied from class: GenericServiceJob
Method is called prior to running the service.

Overrides:
init in class GenericServiceJob
Throws:
InvalidJobException
See Also:
GenericServiceJob.init()

finish

protected void finish()
               throws InvalidJobException
Description copied from class: GenericServiceJob
Method is called after the service has finished.

Overrides:
finish in class GenericServiceJob
Throws:
InvalidJobException
See Also:
GenericServiceJob.finish()

failed

protected void failed(java.lang.Throwable t)
               throws InvalidJobException
Description copied from class: GenericServiceJob
Method is called when the service fails.

Overrides:
failed in class GenericServiceJob
Parameters:
t - Throwable
Throws:
InvalidJobException
See Also:
GenericServiceJob.failed(Throwable)

getServiceName

protected java.lang.String getServiceName()
                                   throws InvalidJobException
Description copied from class: GenericServiceJob
Gets the name of the service as defined in the definition file.

Overrides:
getServiceName in class GenericServiceJob
Returns:
The name of the service to be invoked.
Throws:
InvalidJobException
See Also:
GenericServiceJob.getServiceName()

getContext

protected java.util.Map<java.lang.String,java.lang.Object> getContext()
                                                               throws InvalidJobException
Description copied from class: GenericServiceJob
Gets the context for the service invocation.

Overrides:
getContext in class GenericServiceJob
Returns:
Map of name value pairs making up the service context.
Throws:
InvalidJobException
See Also:
GenericServiceJob.getContext()