org.quartz.jobs.ee.jmx
Class JMXInvokerJob

java.lang.Object
  extended by org.quartz.jobs.ee.jmx.JMXInvokerJob
All Implemented Interfaces:
Job

public class JMXInvokerJob
extends Object
implements Job

Generic JMX invoker Job. It supports any number or type of parameters to the JMX bean.

The required parameters are as follows (case doesn't matter):

JMX_OBJECTNAME
This is the fully qualifed name of the object (ie in JBoss to lookup the log4j jmx bean you would specify "jboss.system:type=Log4jService,service=Logging"
JMX_METHOD
This is the method to invoke on the specified JMX Bean. (ie in JBoss to change the log level you would specify "setLoggerLevel"
JMX_PARAMDEFS
This is a definition of the parameters to be passed to the specified method and their corresponding java types. Each parameter definition is comma seperated and has the following parts: :. Type is the java type for the parameter. The following types are supported:

i - is for int

l - is for long

f - is for float

d - is for double

s - is for String

b - is for boolean

For ilfdb use lower for native type and upper for object wrapper. The name portion of the definition is the name of the parameter holding the string value. (ie s:fname,s:lname would require 2 parameters of the name fname and lname and would be passed in that order to the method.

Author:
James Nelson ([email protected]) -- Provident Solutions LLC

Constructor Summary
JMXInvokerJob()
           
 
Method Summary
 void execute(JobExecutionContext context)
           Called by the Scheduler when a Trigger fires that is associated with the Job.
protected  org.slf4j.Logger getLog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXInvokerJob

public JMXInvokerJob()
Method Detail

execute

public void execute(JobExecutionContext context)
             throws JobExecutionException
Description copied from interface: Job

Called by the Scheduler when a Trigger fires that is associated with the Job.

The implementation may wish to set a result object on the JobExecutionContext before this method exits. The result itself is meaningless to Quartz, but may be informative to JobListeners or TriggerListeners that are watching the job's execution.

Specified by:
execute in interface Job
Throws:
JobExecutionException - if there is an exception while executing the job.

getLog

protected org.slf4j.Logger getLog()


Copyright 2001-2015, Terracotta, Inc.