public class JMXStatusEntry extends Object implements StatusEntry
Constructor and Description |
---|
JMXStatusEntry(ObjectName mBeanName)
Constructor for the JMXStatusEntry.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(StatusEntry o)
Compares two entries according to first their location, then their machine name, then their ports, and then their
application name, and then their index.
|
String |
getApplicationInstanceID()
Get the instance id of the application that this status entry is from.
|
String |
getApplicationName()
Get the name of the application that this status entry is from.
|
String |
getArchiveReplicaName()
Get the replica id of the application that this status entry is represents.
|
String |
getHarvestPriority()
Get the priority of the harvest queue that this status entry is from.
|
String |
getHTTPPort()
Get the HTTP port used by the application this status entry is from.
|
String |
getIndex()
Get the index in the list of most recent log messages that this status entry is from.
|
String |
getLogMessage(Locale l)
Gets the log message from this status entry.
|
String |
getMachineName()
Get the name of the host (machine) this status entry is from.
|
String |
getPhysicalLocation()
Get the (physical) location this status entry is from, e.g.
|
static List<StatusEntry> |
queryJMX(String query)
Query the JMX system for system status mbeans.
|
static void |
unregisterJMXInstance(String query)
Unregister an JMX MBean instance.
|
public JMXStatusEntry(ObjectName mBeanName)
mBeanName
- The ObjectName to be assigned to the MBean representing this JMXStatusEntry.public String getPhysicalLocation()
StatusEntry
getPhysicalLocation
in interface StatusEntry
JMXSummaryUtils.JMXPhysLocationProperty
public String getMachineName()
StatusEntry
getMachineName
in interface StatusEntry
JMXSummaryUtils.JMXMachineNameProperty
public String getHTTPPort()
StatusEntry
getHTTPPort
in interface StatusEntry
JMXSummaryUtils.JMXHttpportProperty
public String getApplicationName()
StatusEntry
getApplicationName
in interface StatusEntry
JMXSummaryUtils.JMXApplicationNameProperty
public String getApplicationInstanceID()
StatusEntry
getApplicationInstanceID
in interface StatusEntry
JMXSummaryUtils.JMXApplicationInstIdProperty
public String getHarvestPriority()
StatusEntry
getHarvestPriority
in interface StatusEntry
JMXSummaryUtils.JMXHarvestChannelProperty
public String getArchiveReplicaName()
StatusEntry
getArchiveReplicaName
in interface StatusEntry
JMXSummaryUtils.JMXArchiveReplicaNameProperty
public String getIndex()
StatusEntry
getIndex
in interface StatusEntry
JMXSummaryUtils.JMXIndexProperty
public String getLogMessage(Locale l)
getLogMessage
in interface StatusEntry
l
- the current LocaleArgumentNotValid
- if the current Locale is nullpublic int compareTo(StatusEntry o)
compareTo
in interface Comparable<StatusEntry>
o
- The object to compare withpublic static List<StatusEntry> queryJMX(String query) throws MalformedObjectNameException
query
- A JMX request, e.g. dk.netarkivet.logging:location=EAST,httpport=8080,*MalformedObjectNameException
- If the query has wrong format.public static void unregisterJMXInstance(String query) throws MalformedObjectNameException, InstanceNotFoundException, MBeanRegistrationException
query
- A JMX request, for picking the beans to unregister.MalformedObjectNameException
- if query is malformed.InstanceNotFoundException
- if the instanced unregistered doesn't exists.MBeanRegistrationException
- if unregeterBean is thrown.Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.