Basic implementation of the DynamicMBean interface, which
supports the minimal requirements of the interface contract.
This can be used directly to wrap an existing java bean, or inside an mlet or anywhere an MBean would be used. Limitations:
objectReference are
supported.invoke() are immediately executed.void.| Modifier and Type | Field and Description |
|---|---|
| protected BaseNotificationBroadcaster | attributeBroadcaster
Notification broadcaster for attribute changes. |
| protected BaseNotificationBroadcaster | generalBroadcaster
Notification broadcaster for general notifications. |
| private static final Log | |
| protected ManagedBean | managedBean
Metadata for the mbean instance. |
| pack-priv static final Object[] | |
| protected ObjectName | |
| protected Object | resource
The managed resource this MBean is associated with (if any). |
| protected String | |
| private static final StringManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAttributeChangeNotificationListener(NotificationListener
Listener that will receive event notifications listener, String Name of the attribute of interest, or name, Object null
to indicate interest in all attributesHandback object to be sent along with event
notifications handback)Implements javax. Add an attribute change notification event listener to this MBean. |
| public void | addNotificationListener(NotificationListener
Listener that will receive event notifications listener, NotificationFilter Filter object used to filter event notifications
actually delivered, or filter, Object null for no filteringHandback object to be sent along with event
notifications handback)Implements javax. Add a notification event listener to this MBean. |
| public Object | getAttribute(String
Name of the requested attribute name)Implements javax. Obtain and return the value of a specific attribute of this MBean. |
| pack-priv static Class | |
| public AttributeList | getAttributes(String[]
Names of the requested attributes names)Implements javax. Obtain and return the values of several attributes of this MBean. |
| public String | |
| public ObjectName | |
| public Object | Returns: the backend managed objectGet the instance handle of the object against which we execute all methods in this ModelMBean management interface. |
| public MBeanInfo | getMBeanInfo()
Implements javax. Return the |
| public String | |
| public MBeanNotificationInfo[] | getNotificationInfo()
Implements javax. Return an |
| public String | |
| public Object | invoke(String
Name of the operation to be invoked name, Object[] Array containing the method parameters of this operation params, String[] Array containing the class names representing
the signature of this operation signature)Implements javax. Invoke a particular method on this MBean, and return any returned value. |
| public void | postDeregister()
Implements javax. Allows the MBean to perform any operations needed after having been unregistered in the MBean server. |
| public void | postRegister(Boolean
Indicates whether or not the MBean has
been successfully registered in the MBean server. The value
false means that the registration phase has failed. registrationDone)Implements javax. Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
| public void | preDeregister()
Implements javax. Allows the MBean to perform any operations it needs before being unregistered by the MBean server. |
| public ObjectName | preRegister(MBeanServer
The MBean Server in which the MBean will be registered. server, ObjectName The object name of the MBean. This name is null if
the name parameter to one of the name)createMBean or
registerMBean methods in the MBeanServer
interface is null. In that case, this method must return a
non-null ObjectName for the new MBean.Implements javax. Allows the MBean to perform any operations it needs before being registered in the MBean Server. |
| public void | removeAttributeChangeNotificationListener(NotificationListener
The listener to be removed listener, String The attribute name for which no more events are required name)Implements javax. Remove an attribute change notification event listener from this MBean. |
| public void | removeNotificationListener(NotificationListener
The listener to be removed (any and all registrations
for this listener will be eliminated) listener)Implements javax. Remove a notification event listener from this MBean. |
| public void | sendAttributeChangeNotification(AttributeChangeNotification
The notification)AttributeChangeNotification
that will be passedImplements javax. Send an |
| public void | sendAttributeChangeNotification(Attribute
The original value of the oldValue, Attribute AttributeThe new value of the newValue)AttributeImplements javax. Send an |
| public void | sendNotification(Notification
The notification)Notification that will be passedImplements javax. Send a |
| public void | sendNotification(String
The message string to be passed message)Implements javax. Send a |
| public void | setAttribute(Attribute
The identification of the attribute to be set
and the new value attribute)Implements javax. Set the value of a specific attribute of this MBean. |
| public AttributeList | Returns: The list of attributes that were set and their new valuesTHe names and values to be set attributes)Implements javax. Set the values of several attributes of this MBean. |
| public void | |
| public void | setManagedResource(Object
The resource object to be managed resource, String The type of reference for the managed resource
("ObjectReference", "Handle", "IOR", "EJBHandle", or
"RMIReference") type)Set the instance handle of the object against which we will execute all methods in this ModelMBean management interface. |
| public String |
| attributeBroadcaster | back to summary |
|---|---|
| protected BaseNotificationBroadcaster attributeBroadcaster Notification broadcaster for attribute changes. | |
| generalBroadcaster | back to summary |
|---|---|
| protected BaseNotificationBroadcaster generalBroadcaster Notification broadcaster for general notifications. | |
| log | back to summary |
|---|---|
| private static final Log log | |
| managedBean | back to summary |
|---|---|
| protected ManagedBean managedBean Metadata for the mbean instance. | |
| NO_ARGS_PARAM | back to summary |
|---|---|
| pack-priv static final Object[] NO_ARGS_PARAM | |
| oname | back to summary |
|---|---|
| protected ObjectName oname | |
| resource | back to summary |
|---|---|
| protected Object resource The managed resource this MBean is associated with (if any). | |
| resourceType | back to summary |
|---|---|
| protected String resourceType | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| BaseModelMBean | back to summary |
|---|---|
| public BaseModelMBean() | |
| addAttributeChangeNotificationListener | back to summary |
|---|---|
| public void addAttributeChangeNotificationListener(NotificationListener listener, String name, Object handback) throws IllegalArgumentException Implements javax. Add an attribute change notification event listener to this MBean.
| |
| addNotificationListener | back to summary |
|---|---|
| public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException Implements javax. Add a notification event listener to this MBean.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException Implements javax. Obtain and return the value of a specific attribute of this MBean.
| |
| getAttributeClass | back to summary |
|---|---|
| pack-priv static Class | |
| getAttributes | back to summary |
|---|---|
| public AttributeList getAttributes(String[] names) Implements javax. Obtain and return the values of several attributes of this MBean.
| |
| getClassName | back to summary |
|---|---|
| public String getClassName() | |
| getJmxName | back to summary |
|---|---|
| public ObjectName getJmxName() | |
| getManagedResource | back to summary |
|---|---|
| public Object getManagedResource() throws InstanceNotFoundException, InvalidTargetObjectTypeException, MBeanException, RuntimeOperationsException Get the instance handle of the object against which we execute all methods in this ModelMBean management interface.
| |
| getMBeanInfo | back to summary |
|---|---|
| public MBeanInfo getMBeanInfo() Implements javax. Return the
| |
| getModelerType | back to summary |
|---|---|
| public String getModelerType() | |
| getNotificationInfo | back to summary |
|---|---|
| public MBeanNotificationInfo[] getNotificationInfo() Implements javax. Return an
| |
| getObjectName | back to summary |
|---|---|
| public String getObjectName() | |
| invoke | back to summary |
|---|---|
| public Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException Implements javax. Invoke a particular method on this MBean, and return any returned value. Implementation Note - This implementation will attempt to invoke this method on the MBean itself, or (if not available) on the managed resource object associated with this MBean.
| |
| postDeregister | back to summary |
|---|---|
| public void postDeregister() Implements javax. Doc from javax. Allows the MBean to perform any operations needed after having been unregistered in the MBean server. If the implementation of this method throws a This might be confusing for the code calling
| |
| postRegister | back to summary |
|---|---|
| public void postRegister(Boolean registrationDone) Implements javax. Doc from javax. Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. If the implementation of this method throws a This might be confusing for the code calling | |
| preDeregister | back to summary |
|---|---|
| public void preDeregister() throws Exception Implements javax. Doc from javax. Allows the MBean to perform any operations it needs before being unregistered by the MBean server.
| |
| preRegister | back to summary |
|---|---|
| public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception Implements javax. Doc from javax. Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.
| |
| removeAttributeChangeNotificationListener | back to summary |
|---|---|
| public void removeAttributeChangeNotificationListener(NotificationListener listener, String name) throws ListenerNotFoundException Implements javax. Remove an attribute change notification event listener from this MBean.
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException Implements javax. Remove a notification event listener from this MBean.
| |
| sendAttributeChangeNotification | back to summary |
|---|---|
| public void sendAttributeChangeNotification(AttributeChangeNotification notification) throws MBeanException, RuntimeOperationsException Implements javax. Send an
| |
| sendAttributeChangeNotification | back to summary |
|---|---|
| public void sendAttributeChangeNotification(Attribute oldValue, Attribute newValue) throws MBeanException, RuntimeOperationsException Implements javax. Send an
| |
| sendNotification | back to summary |
|---|---|
| public void sendNotification(Notification notification) throws MBeanException, RuntimeOperationsException Implements javax. Send a
| |
| sendNotification | back to summary |
|---|---|
| public void sendNotification(String message) throws MBeanException, RuntimeOperationsException Implements javax. Send a
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(Attribute attribute) throws AttributeNotFoundException, MBeanException, ReflectionException Implements javax. Set the value of a specific attribute of this MBean.
| |
| setAttributes | back to summary |
|---|---|
| public AttributeList setAttributes(AttributeList attributes) Implements javax. Set the values of several attributes of this MBean.
| |
| setManagedBean | back to summary |
|---|---|
| public void setManagedBean(ManagedBean managedBean) | |
| setManagedResource | back to summary |
|---|---|
| public void setManagedResource(Object resource, String type) throws InstanceNotFoundException, MBeanException, RuntimeOperationsException Set the instance handle of the object against which we will execute all methods in this ModelMBean management interface. The caller can provide the mbean instance or the object name to the resource, if needed.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |