public class ModelMBeanImpl
extends java.lang.Object
implements javax.management.modelmbean.ModelMBean, javax.management.MBeanRegistration
| Modifier and Type | Field and Description |
|---|---|
protected javax.management.modelmbean.ModelMBeanInfoSupport |
_beanInfo |
static int |
IMPACT_ACTION |
static int |
IMPACT_ACTION_INFO |
static int |
IMPACT_INFO |
static int |
IMPACT_UNKOWN |
static java.lang.String |
INT |
static java.lang.String[] |
NO_PARAMS |
static java.lang.String |
OBJECT |
static boolean |
ON_MBEAN |
static boolean |
ON_OBJECT |
static boolean |
READ_ONLY |
static boolean |
READ_WRITE |
static java.lang.String |
STRING |
| Constructor and Description |
|---|
ModelMBeanImpl()
MBean Constructor.
|
ModelMBeanImpl(java.lang.Object proxyObject)
Proxy MBean Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String name,
java.lang.Object handback) |
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
void |
defineAttribute(javax.management.modelmbean.ModelMBeanAttributeInfo attrInfo)
Define an attribute.
|
void |
defineAttribute(java.lang.String name)
Define an attribute on the managed object.
|
void |
defineAttribute(java.lang.String name,
boolean writable)
Define an attribute on the managed object.
|
void |
defineAttribute(java.lang.String name,
boolean writable,
boolean onMBean)
Define an attribute on the managed object.
|
protected void |
defineManagedResource()
Define the Managed Resource.
|
void |
defineOperation(javax.management.modelmbean.ModelMBeanOperationInfo opInfo)
Define an operation.
|
void |
defineOperation(java.lang.String name,
int impact)
Define an operation on the managed object.
|
void |
defineOperation(java.lang.String name,
java.lang.String[] signature,
int impact)
Define an operation on the managed object.
|
void |
defineOperation(java.lang.String name,
java.lang.String[] signature,
int impact,
boolean onMBean)
Define an operation on the managed object.
|
protected void |
destroyComponentMBeans(java.util.Map map)
Unregister mbeans for already registered components
|
java.lang.Object |
getAttribute(java.lang.String name) |
javax.management.AttributeList |
getAttributes(java.lang.String[] names) |
java.lang.String |
getBaseObjectName() |
protected javax.management.ObjectName[] |
getComponentMBeans(java.lang.Object[] components,
java.util.Map map)
Get Component MBeans.
|
static java.lang.String |
getDefaultDomain() |
java.lang.Object |
getManagedResource() |
javax.management.MBeanInfo |
getMBeanInfo() |
javax.management.MBeanServer |
getMBeanServer() |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo() |
javax.management.ObjectName |
getObjectName() |
java.lang.Object |
invoke(java.lang.String name,
java.lang.Object[] params,
java.lang.String[] signature) |
void |
load() |
static javax.management.modelmbean.ModelMBean |
mbeanFor(java.lang.Object o)
Create MBean for Object.
|
protected javax.management.ObjectName |
newObjectName(javax.management.MBeanServer server)
Create a new ObjectName.
|
void |
postDeregister()
Post Deregister.
|
void |
postRegister(java.lang.Boolean ok) |
void |
preDeregister() |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName oName)
Pre registration notification.
|
void |
removeAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String name) |
void |
removeNotificationListener(javax.management.NotificationListener listener) |
void |
sendAttributeChangeNotification(javax.management.Attribute oldAttr,
javax.management.Attribute newAttr) |
void |
sendAttributeChangeNotification(javax.management.AttributeChangeNotification notify) |
void |
sendNotification(javax.management.Notification notify) |
void |
sendNotification(java.lang.String notify) |
void |
setAttribute(javax.management.Attribute attr) |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attrs) |
void |
setBaseObjectName(java.lang.String s) |
static void |
setDefaultDomain(java.lang.String d) |
void |
setManagedResource(java.lang.Object proxyObject,
java.lang.String type) |
void |
setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo info)
Not Supported.
|
void |
store() |
javax.management.ObjectName |
uniqueObjectName(javax.management.MBeanServer server,
java.lang.Object object,
java.lang.String objectName) |
javax.management.ObjectName |
uniqueObjectName(javax.management.MBeanServer server,
java.lang.String objectName)
Add an id clause to a JMX object name.
|
public static final int IMPACT_ACTION
public static final int IMPACT_ACTION_INFO
public static final int IMPACT_INFO
public static final int IMPACT_UNKOWN
public static final java.lang.String STRING
public static final java.lang.String OBJECT
public static final java.lang.String INT
public static final java.lang.String[] NO_PARAMS
public static final boolean READ_WRITE
public static final boolean READ_ONLY
public static final boolean ON_MBEAN
public static final boolean ON_OBJECT
protected javax.management.modelmbean.ModelMBeanInfoSupport _beanInfo
public ModelMBeanImpl()
public ModelMBeanImpl(java.lang.Object proxyObject)
proxyObject - The actual object on which attributes and
operations are to be defined and called.public static javax.management.modelmbean.ModelMBean mbeanFor(java.lang.Object o)
class com.acme.MyClass extends com.acme.util.BaseClassThen this method would look for the following classes:
o - The objectpublic static java.lang.String getDefaultDomain()
public static void setDefaultDomain(java.lang.String d)
public javax.management.MBeanServer getMBeanServer()
public javax.management.ObjectName getObjectName()
public java.lang.Object getManagedResource()
public void setManagedResource(java.lang.Object proxyObject,
java.lang.String type)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException,
javax.management.InstanceNotFoundException,
javax.management.modelmbean.InvalidTargetObjectTypeException
setManagedResource in interface javax.management.modelmbean.ModelMBeanjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionjavax.management.InstanceNotFoundExceptionjavax.management.modelmbean.InvalidTargetObjectTypeExceptionprotected void defineManagedResource()
public void setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo info)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException
setModelMBeanInfo in interface javax.management.modelmbean.ModelMBeanjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionpublic void defineAttribute(java.lang.String name)
name - The name of the attribute. Normal java bean
capitlization is enforced on this name.public void defineAttribute(java.lang.String name,
boolean writable)
name - The name of the attribute. Normal java bean
capitlization is enforced on this name.writable - If false, do not look for a setter.public void defineAttribute(java.lang.String name,
boolean writable,
boolean onMBean)
name - The name of the attribute. Normal java bean
capitlization is enforced on this name.writable - If false, do not look for a setter.onMBean - .public void defineAttribute(javax.management.modelmbean.ModelMBeanAttributeInfo attrInfo)
attrInfo - ModelMBeanAttributeInfo.public void defineOperation(java.lang.String name,
int impact)
name - Name of the method callimpact - Impact as defined in MBeanOperationInfopublic void defineOperation(java.lang.String name,
java.lang.String[] signature,
int impact)
name - The name of the method call.signature - The types of the operation parameters.impact - Impact as defined in MBeanOperationInfopublic void defineOperation(java.lang.String name,
java.lang.String[] signature,
int impact,
boolean onMBean)
name - The name of the method call.signature - The types of the operation parameters.impact - Impact as defined in MBeanOperationInfoonMBean - true if the operation is defined on the mbeanpublic void defineOperation(javax.management.modelmbean.ModelMBeanOperationInfo opInfo)
opInfo - public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBeanpublic java.lang.Object getAttribute(java.lang.String name)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionpublic javax.management.AttributeList getAttributes(java.lang.String[] names)
getAttributes in interface javax.management.DynamicMBeanpublic void setAttribute(javax.management.Attribute attr)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionpublic javax.management.AttributeList setAttributes(javax.management.AttributeList attrs)
setAttributes in interface javax.management.DynamicMBeanpublic java.lang.Object invoke(java.lang.String name,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
invoke in interface javax.management.DynamicMBeanjavax.management.MBeanExceptionjavax.management.ReflectionExceptionpublic void load()
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException,
javax.management.InstanceNotFoundException
load in interface javax.management.PersistentMBeanjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionjavax.management.InstanceNotFoundExceptionpublic void store()
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException,
javax.management.InstanceNotFoundException
store in interface javax.management.PersistentMBeanjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionjavax.management.InstanceNotFoundExceptionpublic void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws java.lang.IllegalArgumentException
addNotificationListener in interface javax.management.NotificationBroadcasterjava.lang.IllegalArgumentExceptionpublic javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface javax.management.NotificationBroadcasterpublic void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
removeNotificationListener in interface javax.management.NotificationBroadcasterjavax.management.ListenerNotFoundExceptionpublic void addAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String name,
java.lang.Object handback)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException,
java.lang.IllegalArgumentException
addAttributeChangeNotificationListener in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionjava.lang.IllegalArgumentExceptionpublic void removeAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String name)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException,
javax.management.ListenerNotFoundException
removeAttributeChangeNotificationListener in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionjavax.management.ListenerNotFoundExceptionpublic void sendAttributeChangeNotification(javax.management.Attribute oldAttr,
javax.management.Attribute newAttr)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException
sendAttributeChangeNotification in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionpublic void sendAttributeChangeNotification(javax.management.AttributeChangeNotification notify)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException
sendAttributeChangeNotification in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionpublic void sendNotification(java.lang.String notify)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException
sendNotification in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionpublic void sendNotification(javax.management.Notification notify)
throws javax.management.MBeanException,
javax.management.RuntimeOperationsException
sendNotification in interface javax.management.modelmbean.ModelMBeanNotificationBroadcasterjavax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionprotected javax.management.ObjectName newObjectName(javax.management.MBeanServer server)
public void setBaseObjectName(java.lang.String s)
public java.lang.String getBaseObjectName()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName oName)
preRegister in interface javax.management.MBeanRegistrationserver - oName - public void postRegister(java.lang.Boolean ok)
postRegister in interface javax.management.MBeanRegistrationpublic void preDeregister()
preDeregister in interface javax.management.MBeanRegistrationpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpublic javax.management.ObjectName uniqueObjectName(javax.management.MBeanServer server,
java.lang.String objectName)
objectName - public javax.management.ObjectName uniqueObjectName(javax.management.MBeanServer server,
java.lang.Object object,
java.lang.String objectName)
protected javax.management.ObjectName[] getComponentMBeans(java.lang.Object[] components,
java.util.Map map)
components - the components.map - A map of previously registered components to object
name. If null is passed, a default map for the mbean is used.protected void destroyComponentMBeans(java.util.Map map)
map - Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.