Package org.apache.ofbiz.service.job
Class JobPoller
java.lang.Object
org.apache.ofbiz.service.job.JobPoller
- All Implemented Interfaces:
ServiceConfigListener
Job poller. Queues and runs jobs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JobPoller
Returns theJobPoller
instance.Returns aMap
containingJobPoller
statistics.void
onServiceConfigChange
(ServiceConfig serviceConfig) Processesserviceengine.xml
changes.void
Adds a job to the job queue.static void
Register aJobManager
with the job poller.void
stop()
Stops theJobPoller
.
-
Method Details
-
getInstance
Returns theJobPoller
instance. -
registerJobManager
Register aJobManager
with the job poller.- Parameters:
jm
- TheJobManager
to register.- Throws:
IllegalArgumentException
- ifjm
is null
-
getPoolState
Returns aMap
containingJobPoller
statistics. -
onServiceConfigChange
Description copied from interface:ServiceConfigListener
Processesserviceengine.xml
changes.- Specified by:
onServiceConfigChange
in interfaceServiceConfigListener
- Parameters:
serviceConfig
- The newServiceConfig
instance.
-
queueNow
Adds a job to the job queue.- Throws:
InvalidJobException
- if the job is in an invalid state.
-
stop
public void stop()Stops theJobPoller
. This method is called when OFBiz shuts down. TheJobPoller
cannot be restarted.
-