|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.backsource.qcron.MBeanJob
A Quartz job that will delegate to an MBean.
Delegation is enforced by saving a the MBeanJob in the JobDataMap of the JJobDetail this is connected to. Since MBeanJobb is a serializable class this wil work even if JobDataMap is saved to peristent store. To make this work one have to create an MBeanJob and set it in the JobDataMap of the JobDetail that should have this job as its executor, eg:
jobDetail = new JobDetail(name,
group,
MBeanJob.class
);
MBeanJob job = new MBeanJob( jobDetail.getJobDataMap(),
jobObjectName);
This will the work automagically.
| Field Summary | |
protected javax.management.ObjectName |
mbean
|
protected java.lang.String |
methodName
|
| Constructor Summary | |
MBeanJob()
Empty constructor when created through Quartz. |
|
MBeanJob(org.quartz.JobDataMap map,
javax.management.ObjectName mbean)
Object name of an MBean implementing the job interface to delegate calls to job to. |
|
MBeanJob(org.quartz.JobDataMap map,
javax.management.ObjectName mbean,
java.lang.String methodName)
Delegate to MBean, but invoke method methodName, wich must be a non param method. |
|
| Method Summary | |
void |
execute(org.quartz.JobExecutionContext context)
impl of job. |
static MBeanJob |
getMBeanJob(org.quartz.JobDataMap map)
Get the job from the map. |
javax.management.ObjectName |
getObjectName()
|
static void |
setMBeanJob(org.quartz.JobDataMap map,
MBeanJob job)
Set the job in the map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.management.ObjectName mbean
protected java.lang.String methodName
| Constructor Detail |
public MBeanJob()
public MBeanJob(org.quartz.JobDataMap map,
javax.management.ObjectName mbean)
public MBeanJob(org.quartz.JobDataMap map,
javax.management.ObjectName mbean,
java.lang.String methodName)
| Method Detail |
public static void setMBeanJob(org.quartz.JobDataMap map,
MBeanJob job)
public static MBeanJob getMBeanJob(org.quartz.JobDataMap map)
public javax.management.ObjectName getObjectName()
public void execute(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
When Quartz triggers a job a new instance of this class will be created and this method gets called.
execute in interface org.quartz.Joborg.quartz.JobExecutionException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||