public class JMXHelper extends Helper implements DynamicMBean
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_PERIOD
the default period which the helper will wait for between calls to periodicUpdate in milliseconds.
|
static String |
DEFAULT_RMI_HOST
default value for the rmi server host address used by the JMX onnector server
used only if an rmi server is required for the JMXConnector
|
static int |
DEFAULT_RMI_PORT
default value for the rmi server port used by the JMX connector server
used only if an rmi server is required for the JMXConnector
|
static int |
DEFAULT_SAMPLE_SET_SIZE
default number of samples we are willing to store in order to maintain a running count of all previous
|
static String |
JMX_URL
JMX Url pattern for use when creating the connector server
|
static String |
SYSPROP_MBEAN_SERVER
This is a system property whose value will determine which MBean Server the
MBeans should be registered in.
|
Constructor and Description |
---|
JMXHelper(Rule rule)
constructor allowing this helper to be used as a helper
|
Modifier and Type | Method and Description |
---|---|
static void |
activated()
helper activation method which creates a periodic helper thread to perform periodic calls to the trigger
method.
|
static void |
deactivated()
helper deactivation method which shuts down the periodic helper thread.
|
Object |
getAttribute(String attribute) |
AttributeList |
getAttributes(String[] attributes) |
MBeanInfo |
getMBeanInfo() |
Object |
getValue(int idx)
getter for counter values used by MBean code
|
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
addCountDown, callerCheck, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, clear, closeTrace, countDown, createCountDown, createCounter, createCounter, createJoin, createLinkMap, createRendezvous, createRendezvous, createTimer, debug, decrementCounter, delay, deleteCounter, deleteLinkMap, deleteRendezvous, deleteTimer, err, errTraceException, flag, flagged, formatAllStacks, formatAllStacks, formatAllStacks, formatAllStacks, formatStack, formatStack, formatStack, formatStack, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackRange, formatThreadStack, formatThreadStack, formatThreadStack, formatThreadStack, getCountDown, getElapsedTimeFromTimer, getObjectSize, getRendezvous, getStack, incrementCounter, incrementCounter, installed, isCountDown, isJoin, isRendezvous, joinEnlist, joinWait, joinWait, killJVM, killJVM, killThread, link, link, linked, linked, matchIndex, noisy, noisyTraceException, openTrace, openTrace, out, outTraceException, printFrame, printlnFrame, readCounter, readCounter, rendezvous, rendezvous, resetTimer, setTriggering, signalKill, signalKill, signalThrow, signalThrow, signalWake, signalWake, toString, trace, trace, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceClose, traceln, traceln, traceOpen, traceOpen, traceStack, traceStack, traceStack, traceStack, traceStack, traceStack, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackRange, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, triggerIndex, uninstalled, unlink, unlink, verbose, verboseTraceException, waitFor, waitFor, waiting
public static final String SYSPROP_MBEAN_SERVER
public static final long DEFAULT_PERIOD
public static final int DEFAULT_SAMPLE_SET_SIZE
public static final String DEFAULT_RMI_HOST
public static final int DEFAULT_RMI_PORT
public static final String JMX_URL
public JMXHelper(Rule rule)
rule
- the rule this helper is attached topublic static void activated()
public static void deactivated()
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object getValue(int idx)
idx
- the index into the key listCopyright © 2017. All Rights Reserved.