Class ObjectMBean
- java.lang.Object
-
- org.eclipse.jetty.jmx.ObjectMBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
- Direct Known Subclasses:
AbstractConnectorMBean
,AbstractHandlerMBean
,FilterMappingMBean
,HolderMBean
,HttpClientMBean
,ServerMBean
,ServletMappingMBean
@Deprecated(since="2021-05-27") public class ObjectMBean extends java.lang.Object implements javax.management.DynamicMBean
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A dynamic MBean that can wrap an arbitrary Object instance.
The attributes and operations exposed by this bean are controlled by the merge of annotations discovered in all superclasses and all superinterfaces.
Given class
com.acme.Foo
, thencom.acme.jmx.FooMBean
is searched; if found, it is instantiated with thecom.acme.Foo
instance passed to the constructor.Class
com.acme.jmx.FooMBean
can then override the default behavior of ObjectMBean and provide a custom ObjectName, or custom ObjectName propertiesname
andcontext
, etc.
-
-
Constructor Summary
Constructors Constructor Description ObjectMBean(java.lang.Object managedObject)
Deprecated.Creates a new ObjectMBean wrapping the givenmanagedObject
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
getAttribute(java.lang.String name)
Deprecated.javax.management.AttributeList
getAttributes(java.lang.String[] names)
Deprecated.java.lang.Object
getManagedObject()
Deprecated.MBeanContainer
getMBeanContainer()
Deprecated.javax.management.MBeanInfo
getMBeanInfo()
Deprecated.java.lang.String
getObjectContextBasis()
Deprecated.Allows to customize the ObjectName propertycontext
.javax.management.ObjectName
getObjectName()
Deprecated.Allows to customize the ObjectName of this MBean.java.lang.String
getObjectNameBasis()
Deprecated.Allows to customize the ObjectName propertyname
.java.lang.Object
invoke(java.lang.String name, java.lang.Object[] params, java.lang.String[] signature)
Deprecated.static java.lang.Object
mbeanFor(java.lang.Object o)
Deprecated.UseMBeanContainer.mbeanFor(Object)
insteadvoid
setAttribute(javax.management.Attribute attribute)
Deprecated.javax.management.AttributeList
setAttributes(javax.management.AttributeList attributes)
Deprecated.
-
-
-
Method Detail
-
getManagedObject
public java.lang.Object getManagedObject()
Deprecated.- Returns:
- the managed object
-
getObjectName
public javax.management.ObjectName getObjectName()
Deprecated.Allows to customize the ObjectName of this MBean.
- Returns:
- a custom ObjectName, or null to indicate to
MBeanContainer
to create a default ObjectName
-
getObjectContextBasis
public java.lang.String getObjectContextBasis()
Deprecated.Allows to customize the ObjectName property
context
.When
MBeanContainer
creates default ObjectNames, thecontext
property is "inherited" recursively by MBeans that are children of this MBean; this allows to "group" descendant MBeans so that it is clear who is the ancestor they belong to.For example, if object A has a child component B which has children components C, then AMBean can override this method to return "alpha", and then the ObjectNames will be:
- domain:type=a,context=alpha,id=0
- domain:type=b,context=alpha,id=0
- domain:type=c,context=alpha,id=0
- domain:type=c,context=alpha,id=1
- Returns:
- a custom value for the property
context
-
getObjectNameBasis
public java.lang.String getObjectNameBasis()
Deprecated.Allows to customize the ObjectName property
name
.Certain components have a natural name and returning it from this method allows it to be part of the ObjectName.
- Returns:
- a custom value for the property
name
-
getMBeanContainer
public MBeanContainer getMBeanContainer()
Deprecated.
-
mbeanFor
@Deprecated public static java.lang.Object mbeanFor(java.lang.Object o)
Deprecated.UseMBeanContainer.mbeanFor(Object)
instead- Parameters:
o
- the object to wrap as MBean- Returns:
- a new instance of an MBean for the object or null if the MBean cannot be created
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
Deprecated.- Specified by:
getMBeanInfo
in interfacejavax.management.DynamicMBean
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name) throws javax.management.AttributeNotFoundException, javax.management.ReflectionException, javax.management.MBeanException
Deprecated.- Specified by:
getAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.ReflectionException
javax.management.MBeanException
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] names)
Deprecated.- Specified by:
getAttributes
in interfacejavax.management.DynamicMBean
-
setAttribute
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.ReflectionException, javax.management.MBeanException
Deprecated.- Specified by:
setAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.ReflectionException
javax.management.MBeanException
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
Deprecated.- Specified by:
setAttributes
in interfacejavax.management.DynamicMBean
-
invoke
public java.lang.Object invoke(java.lang.String name, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.ReflectionException, javax.management.MBeanException
Deprecated.- Specified by:
invoke
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.ReflectionException
javax.management.MBeanException
-
-