APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jmx.mbeanserver

pack-priv final Class MBeanServerDelegateImpl

extends MBeanServerDelegate
implements DynamicMBean, MBeanRegistration
Class Inheritance
All Implemented Interfaces
javax.management.MBeanRegistration, javax.management.DynamicMBean
Imports
java.lang.System.Logger.Level, javax.management.Attribute, .AttributeList, .AttributeNotFoundException, .DynamicMBean, .InvalidAttributeValueException, .JMRuntimeException, .MBeanAttributeInfo, .MBeanException, .MBeanInfo, .MBeanRegistration, .MBeanServer, .MBeanServerDelegate, .ObjectName, .ReflectionException, .RuntimeOperationsException

This class is the MBean implementation of the MBeanServerDelegate.
Since
1.5

Field Summary

Modifier and TypeField and Description
private static final MBeanAttributeInfo[]
private static final String[]
private final MBeanInfo
Inherited from javax.management.MBeanServerDelegate:
DELEGATE_NAME

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The value of the attribute retrieved.
getAttribute
(String
The name of the attribute to be retrieved
attribute
)

Implements javax.management.DynamicMBean.getAttribute.

Obtains the value of a specific attribute of the MBeanServerDelegate.

public AttributeList

Returns:

The list of attributes retrieved.
getAttributes
(String[]
A list of the attributes to be retrieved.
attributes
)

Implements javax.management.DynamicMBean.getAttributes.

Makes it possible to get the values of several attributes of the MBeanServerDelegate.

public MBeanInfo

Returns:

The MBeanInfo describing the MBeanServerDelegate.
getMBeanInfo
()

Implements javax.management.DynamicMBean.getMBeanInfo.

Provides the MBeanInfo describing the MBeanServerDelegate.

public Object

Returns:

The object returned by the action, which represents the result of invoking the action on the MBean specified.
invoke
(String
The name of the action to be invoked.
actionName
,
Object[]
An array containing the parameters to be set when the action is invoked.
params
,
String[]
An array containing the signature of the action.
signature
)

Implements javax.management.DynamicMBean.invoke.

Always fails since the MBeanServerDelegate MBean has no operation.

public final void
postDeregister()

Implements javax.management.MBeanRegistration.postDeregister.

Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

public final void
postRegister(Boolean registrationDone)

Implements javax.management.MBeanRegistration.postRegister.

Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

public final void
preDeregister()

Implements javax.management.MBeanRegistration.preDeregister.

Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

public final ObjectName
preRegister(MBeanServer server, ObjectName name)

Implements javax.management.MBeanRegistration.preRegister.

Allows the MBean to perform any operations it needs before being registered in the MBean Server.

public void
setAttribute(Attribute
The identification of the attribute to be set and the value it is to be set to.
attribute
)

Implements javax.management.DynamicMBean.setAttribute.

This method always fail since all MBeanServerDelegateMBean attributes are read-only.

public AttributeList

Returns:

The list of attributes that were set, with their new values. In fact, this method always return an empty list since all MBeanServerDelegateMBean attributes are read-only.
setAttributes
(AttributeList
A list of attributes: The identification of the attributes to be set and the values they are to be set to.
attributes
)

Implements javax.management.DynamicMBean.setAttributes.

This method always return an empty list since all MBeanServerDelegateMBean attributes are read-only.

Inherited from javax.management.MBeanServerDelegate:
addNotificationListenergetImplementationNamegetImplementationVendorgetImplementationVersiongetMBeanServerIdgetNotificationInfogetSpecificationNamegetSpecificationVendorgetSpecificationVersionremoveNotificationListenerremoveNotificationListenersendNotification

Field Detail

attributeInfosback to summary
private static final MBeanAttributeInfo[] attributeInfos
attributeNamesback to summary
private static final String[] attributeNames
delegateInfoback to summary
private final MBeanInfo delegateInfo

Constructor Detail

MBeanServerDelegateImplback to summary
public MBeanServerDelegateImpl()

Method Detail

getAttributeback to summary
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.getAttribute.

Obtains the value of a specific attribute of the MBeanServerDelegate.

Parameters
attribute:String

The name of the attribute to be retrieved

Returns:Object

The value of the attribute retrieved.

Exceptions
AttributeNotFoundException:

Doc from javax.management.DynamicMBean.getAttribute.

if specified attribute does not exist or cannot be retrieved

MBeanException:
Wraps a java.lang.Exception thrown by the MBean's getter.
ReflectionException:

Doc from javax.management.DynamicMBean.getAttribute.

Wraps a java.lang.Exception thrown while trying to invoke the getter.

getAttributesback to summary
public AttributeList getAttributes(String[] attributes)

Implements javax.management.DynamicMBean.getAttributes.

Makes it possible to get the values of several attributes of the MBeanServerDelegate.

Parameters
attributes:String[]

A list of the attributes to be retrieved.

Returns:AttributeList

The list of attributes retrieved.

getMBeanInfoback to summary
public MBeanInfo getMBeanInfo()

Implements javax.management.DynamicMBean.getMBeanInfo.

Provides the MBeanInfo describing the MBeanServerDelegate.

Returns:MBeanInfo

The MBeanInfo describing the MBeanServerDelegate.

invokeback to summary
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException

Implements javax.management.DynamicMBean.invoke.

Always fails since the MBeanServerDelegate MBean has no operation.

Parameters
actionName:String

The name of the action to be invoked.

params:Object[]

An array containing the parameters to be set when the action is invoked.

signature:String[]

An array containing the signature of the action.

Returns:Object

The object returned by the action, which represents the result of invoking the action on the MBean specified.

Exceptions
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's invoked method.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the method.
postDeregisterback to summary
public final void postDeregister()

Implements javax.management.MBeanRegistration.postDeregister.

Doc from javax.management.MBeanRegistration.postDeregister.

Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postDeregister will not change the state of the MBean: the MBean was already successfully deregistered and will remain so.

This might be confusing for the code calling unregisterMBean(), as it might assume that MBean deregistration has failed. Therefore it is recommended that implementations of postDeregister do not throw Runtime Exceptions or Errors if it can be avoided.

postRegisterback to summary
public final void postRegister(Boolean registrationDone)

Implements javax.management.MBeanRegistration.postRegister.

Doc from javax.management.MBeanRegistration.postRegister.

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 RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postRegister will not change the state of the MBean: if the MBean was already registered (registrationDone is true), the MBean will remain registered.

This might be confusing for the code calling createMBean() or registerMBean(), as such code might assume that MBean registration has failed when such an exception is raised. Therefore it is recommended that implementations of postRegister do not throw Runtime Exceptions or Errors if it can be avoided.

preDeregisterback to summary
public final void preDeregister() throws Exception

Implements javax.management.MBeanRegistration.preDeregister.

Doc from javax.management.MBeanRegistration.preDeregister.

Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

Exceptions
Exception:
This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException.
preRegisterback to summary
public final ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception

Implements javax.management.MBeanRegistration.preRegister.

Doc from javax.management.MBeanRegistration.preRegister.

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.

Exceptions
Exception:
This exception will be caught by the MBean Server and re-thrown as an MBeanRegistrationException.
setAttributeback to summary
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.setAttribute.

This method always fail since all MBeanServerDelegateMBean attributes are read-only.

Parameters
attribute:Attribute

The identification of the attribute to be set and the value it is to be set to.

Exceptions
AttributeNotFoundException:

Doc from javax.management.DynamicMBean.setAttribute.

if specified attribute does not exist or cannot be retrieved

InvalidAttributeValueException:

Doc from javax.management.DynamicMBean.setAttribute.

if value specified is not valid for the attribute

MBeanException:

Doc from javax.management.DynamicMBean.setAttribute.

Wraps a java.lang.Exception thrown by the MBean's setter.

ReflectionException:

Doc from javax.management.DynamicMBean.setAttribute.

Wraps a java.lang.Exception thrown while trying to invoke the MBean's setter.

setAttributesback to summary
public AttributeList setAttributes(AttributeList attributes)

Implements javax.management.DynamicMBean.setAttributes.

This method always return an empty list since all MBeanServerDelegateMBean attributes are read-only.

Parameters
attributes:AttributeList

A list of attributes: The identification of the attributes to be set and the values they are to be set to.

Returns:AttributeList

The list of attributes that were set, with their new values. In fact, this method always return an empty list since all MBeanServerDelegateMBean attributes are read-only.