|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.framework.BaseComponent
org.oddjob.framework.SimpleService
org.oddjob.jmx.ClientBase
org.oddjob.jmx.JMXServiceJob
public class JMXServiceJob
Features of this service include:
${my-jmx-world/mydomain:type=greeting,name=hello}Note that what is being referenced here is an Oddjob wrapper around the MBean that allows operations and attributes of the MBean to accessed elsewhere. What is referenced is not an MBean instance.
The example below shows an MBean (wrapper) being passed as the source
property to an InvokeJob
.
Attributes of the MBean can be accessed as if they were properties of the MBean. If the MBean above has an attribute 'FullText' its value can be accessed using the expression:
${my-jmx-world/mydomain:type=greeting,name=hello.FullText}If an MBean Object Name contains dots (.) it must be quoted using double quotes. If the domain in the above example was my.super.domain the MBean can be identified with the expression:
${my-jmx-world/"my.super.domain:type=greeting,name=hello"}and the attribute with:
${my-jmx-world/"my.super.domain:type=greeting,name=hello".FullText}Note that this support for quoting does not apply to Oddjob property expansion expressions in general - only too these MBean identifiers.
<oddjob> <job> <sequential id="sequential"> <jobs> <jmx:service id="jmx-service" connection="localhost:13013" xmlns:jmx="http://rgordon.co.uk/oddjob/jmx"/> <echo id="echo-farm">${jmx-service/"fruit:service=vendor,name=Pickles".Farm}</echo> <set> <values> <value key="jmx-service/fruit:service=vendor,name=Pickles.Rating" value="4.2"/> </values> </set> <invoke id="invoke-quote" function="quote"> <parameters> <value value="apples"/> <value value="2012-08-06"/> <value value="42"/> </parameters> <source> <value value="${jmx-service/fruit:service=vendor,name=Pickles}"/> </source> </invoke> </jobs> </sequential> </job> </oddjob>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.oddjob.jmx.ClientBase |
---|
ClientBase.WhyStop |
Field Summary |
---|
Fields inherited from class org.oddjob.framework.SimpleService |
---|
stateHandler |
Fields inherited from class org.oddjob.framework.BaseComponent |
---|
iconHelper |
Constructor Summary | |
---|---|
JMXServiceJob()
|
Method Summary | |
---|---|
void |
addStructuralListener(StructuralListener listener)
Add a listener. |
protected void |
doStart(MBeanServerConnection mbsc,
ScheduledExecutorService notificationProcessor)
Overridden by subclasses to provide a specific startup. |
protected void |
onStop(ClientBase.WhyStop why)
|
BeanDirectory |
provideBeanDirectory()
Get the BeanDirectory . |
void |
removeStructuralListener(StructuralListener listener)
Remove a listener. |
Methods inherited from class org.oddjob.jmx.ClientBase |
---|
doStop, getConnection, getEnvironment, getHeartbeat, onStart, onStop, setConnection, setEnvironment, setHeartbeat |
Methods inherited from class org.oddjob.framework.SimpleService |
---|
fireDestroyedState, getName, getStateChanger, hardReset, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toString |
Methods inherited from class org.oddjob.framework.BaseComponent |
---|
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSession |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.oddjob.Stateful |
---|
addStateListener, lastStateEvent, removeStateListener |
Constructor Detail |
---|
public JMXServiceJob()
Method Detail |
---|
protected void doStart(MBeanServerConnection mbsc, ScheduledExecutorService notificationProcessor) throws IOException
ClientBase
doStart
in class ClientBase
IOException
protected void onStop(ClientBase.WhyStop why)
onStop
in class ClientBase
public BeanDirectory provideBeanDirectory()
BeanDirectoryOwner
BeanDirectory
. This method may return null if
the BeanDirectory isn't available.
provideBeanDirectory
in interface BeanDirectoryOwner
BeanDirectory
or null.public void addStructuralListener(StructuralListener listener)
Structural
addStructuralListener
in interface Structural
listener
- The listener.public void removeStructuralListener(StructuralListener listener)
Structural
removeStructuralListener
in interface Structural
listener
- The listener.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |