|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.commons.management.basic.AbstractManagementStrategy
public abstract class AbstractManagementStrategy
A base class from which JMX based ManagementStrategy implementations may use as a starting point.
This base class implements the following:
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_DOMAIN
The default domain name to be used when creating a MBeanServer |
| Constructor Summary | |
|---|---|
AbstractManagementStrategy()
|
|
| Method Summary | |
|---|---|
Statistic |
createStatistic(java.lang.String name,
java.lang.Object owner,
Statistic.UpdateMode updateMode)
Creates a statistic; a representation of raw statistical data. |
javax.management.MBeanServer |
getMbeanServer()
Gets the JMX MBeanServer. |
java.lang.String |
getMbeanServerDefaultDomain()
Gets the mbeanServerDefaultDomain property. |
boolean |
getUsePlatformMBeanServer()
Gets the value of the usePlatformMBeanServer property. |
void |
manageObject(java.lang.Object managedObject)
Adds a managed object allowing the ManagementStrategy implementation to record or expose the object as it sees fit. |
void |
notify(java.util.EventObject event)
A default implementation of notify that logs events to java.util.logging using the event class name for the logger, a Level.FINE as the log level and the event source and event toString() to create a loggable message. |
void |
setMbeanServer(javax.management.MBeanServer mbeanServer)
Sets the JMX MBeanServer. |
void |
setMbeanServerDefaultDomain(java.lang.String mbeanServerDefaultDomain)
Sets the mbeanServerDefaultDomain property. |
void |
setUsePlatformMBeanServer(boolean usePlatformMBeanServer)
Sets the value of the usePlatformMBeanServer property. |
void |
unmanageObject(java.lang.Object managedObject)
Removes the managed object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fusesource.commons.management.ManagementStrategy |
|---|
getManagedObjectName, isManaged, manageNamedObject, unmanageNamedObject |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_DOMAIN
| Constructor Detail |
|---|
public AbstractManagementStrategy()
| Method Detail |
|---|
public void manageObject(java.lang.Object managedObject)
throws java.lang.Exception
ManagementStrategy
manageObject in interface ManagementStrategymanagedObject - the managed object
java.lang.Exception - can be thrown if the object could not be added
public void unmanageObject(java.lang.Object managedObject)
throws java.lang.Exception
ManagementStrategy
unmanageObject in interface ManagementStrategymanagedObject - the managed object
java.lang.Exception - can be thrown if the object could not be removed
public void notify(java.util.EventObject event)
throws java.lang.Exception
Applications that use other logging systems (such as commons logging or log4j will typically override this implementation of notify(EventObject).
notify in interface ManagementStrategyevent - the event
java.lang.Exception - can be thrown if the notification failed
public Statistic createStatistic(java.lang.String name,
java.lang.Object owner,
Statistic.UpdateMode updateMode)
ManagementStrategy
createStatistic in interface ManagementStrategyname - The unique name assigned to the statistic usage.owner - The object whose identity is to be associated with the metric.updateMode - The update mode to be assigned to the returned statistic.
Statistic.UpdateModepublic javax.management.MBeanServer getMbeanServer()
public void setMbeanServer(javax.management.MBeanServer mbeanServer)
mbeanServer - the new mbean serverpublic boolean getUsePlatformMBeanServer()
public void setUsePlatformMBeanServer(boolean usePlatformMBeanServer)
usePlatformMBeanServer - If true, then use the JVM's platform MBeanServer. If false, find or
create an MBeanServer using the mbeanServerDefaultDomain property.public java.lang.String getMbeanServerDefaultDomain()
public void setMbeanServerDefaultDomain(java.lang.String mbeanServerDefaultDomain)
mbeanServerDefaultDomain - The MBeanServerDefaultDomainName.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||