public final class InApplicationMonitorJMXConnector extends Object implements DynamicMBean, ReportableObserver
| Modifier and Type | Field and Description |
|---|---|
private static String |
ACTIVATE |
private static String |
ADD_JMX_EXPORTER_PATTERN |
private static String |
ADD_STATE_VALUES_TO_GRAPHITE |
private static String |
ADD_STATSD_PLUGIN |
private CorePlugin |
corePlugin |
private static String |
DEACTIVATE |
private static String |
DUMP_HISTOGRAM_LIKE_VALUE_ANALYSIS |
private static String |
DUMP_STRING_WRITER |
private static String |
GET_REGISTERED_OBSERVERS |
private static String |
GET_REGISTERED_PLUGIN_KEYS |
private static InApplicationMonitorJMXConnector |
instance |
private static String |
IS_MONITOR_ACTIVE |
private JMXBeanRegistrationHelper |
jmxBeanRegistrationHelper |
private static String |
LIST_JMX_EXPORTER_PATTERN |
private static org.slf4j.Logger |
LOG |
private static String |
REMOVE_ALL_PLUGINS |
private static String |
REMOVE_JMX_EXPORTER_PATTERN |
private Map<String,Reportable> |
reportables |
private static Object |
semaphore |
| Constructor and Description |
|---|
InApplicationMonitorJMXConnector(CorePlugin corePlugin,
JmxAppMon4JNamingStrategy jmxAppMon4JNamingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addNewReportable(Reportable reportable)
This method is called for each reportable that is registered on the InApplicationMonitor.
|
private void |
addStateValuesToGraphite(String host,
Integer port,
String appName) |
private void |
addStatsdPlugin(String host,
Integer port,
String appName,
Double sampleRate) |
void |
deactivate() |
String |
dumpHistogramLikeValueAnalysis(String base) |
String |
dumpStringWriter() |
Object |
getAttribute(String attribute) |
AttributeList |
getAttributes(String[] attributes) |
MBeanInfo |
getMBeanInfo() |
List<String> |
getRegisteredObservers() |
List<String> |
getRegisteredPluginKeys() |
private Object |
getValueForReportable(String attribute) |
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
Boolean |
isMonitorActive() |
private void |
registerJMXStuff()
registers the InApplicationMonitor as JMX MBean on the running JMX
server - if no JMX server is running, one is started automagically.
|
void |
removeAllReportables() |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
void |
shutdown() |
private static final String DUMP_STRING_WRITER
private static final String DUMP_HISTOGRAM_LIKE_VALUE_ANALYSIS
private static final String ACTIVATE
private static final String DEACTIVATE
private static final String IS_MONITOR_ACTIVE
private static final String GET_REGISTERED_PLUGIN_KEYS
private static final String GET_REGISTERED_OBSERVERS
private static final String REMOVE_ALL_PLUGINS
private static final String ADD_STATSD_PLUGIN
private static final String ADD_STATE_VALUES_TO_GRAPHITE
private static final String ADD_JMX_EXPORTER_PATTERN
private static final String LIST_JMX_EXPORTER_PATTERN
private static final String REMOVE_JMX_EXPORTER_PATTERN
private static final org.slf4j.Logger LOG
private static volatile InApplicationMonitorJMXConnector instance
private static final Object semaphore
private final Map<String,Reportable> reportables
private final JMXBeanRegistrationHelper jmxBeanRegistrationHelper
private final CorePlugin corePlugin
public InApplicationMonitorJMXConnector(CorePlugin corePlugin, JmxAppMon4JNamingStrategy jmxAppMon4JNamingStrategy)
public void shutdown()
private void registerJMXStuff()
public void addNewReportable(Reportable reportable)
addNewReportable in interface ReportableObserverpublic void removeAllReportables()
public MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeanpublic Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionpublic AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanpublic void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionpublic AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBeanpublic Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke in interface DynamicMBeanMBeanExceptionReflectionExceptionprivate void addStatsdPlugin(String host, Integer port, String appName, Double sampleRate)
private void addStateValuesToGraphite(String host, Integer port, String appName)
public String dumpStringWriter()
public void activate()
public void deactivate()
public Boolean isMonitorActive()
Copyright © 2014 Immobilien Scout GmbH. All rights reserved.