|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpanmx.rmx.RMXBeanFactory
public final class RMXBeanFactory
The RMXBeanFactory consists of static methods to create RMXBeans.
types.
This means that the JMX Connector Server and Connector Client need not share
mBean specific implementation classes. RMXBeans are strongly influenced by
the design of Suns MXBeans.
The RMXBean may use the following types;
java.lang.Booleanjava.lang.Bytejava.lang.Shortjava.lang.Integerjava.lang.Longjava.lang.Floatjava.lang.Doublejava.lang.Stringjava.math.BigDecimaljava.math.BigIntegerjava.util.Datejavax.management.ObjectNameEnum classes. An Enum is mapped to a String
with same value as the name of the enum constant.
CompositeData values.
Theses methods can be passed null values and this scenario should be gracefully
handled by the class.
public static CompositeType getCompositeType()
throws OpenDataException
{
...
}
public static T fromCompositeData( CompositeData compositeData )
throws OpenDataException
{
...
}
public static CompositeData toCompositeData( T t )
throws OpenDataException
{
...
}
CompositeData values.
List<E> where E is one of the above
types. The List is mapped to an array of element type E.
Map<K,V> where K and V are one of
the above types excluding List. The Map is mapped to a
TabularData that has a row type is
a CompositeType with "key" and "value"
fields of type K and V.
RMX Beans can have types that are java beans made up of fields that are expected to have both accessor and mutator methods. The accessors are expected to follow the standard Java Bean pattern;
public [Type] get[name]() { ... }
or if the attribute has a boolean type it can also be accessed via;
public boolean is[name]() { ... }
Mutators also follow the standard Java Bean pattern with one modification - mutators do NOT need to be public.
void set[name]( [Type] t ) { ... }
There are two techniques for creating RMXBean beans. One is to create a RMXBean from the component and a corresponding MXBean interface that defines the management interface. These RMXBeans are "StandardRMXBean"s and are created using the RMXBeanFactory.createStandardRMXBean(...) methods. If not otherwise specified a RMXBean will have a management interface with a classname the same as it's classname postfixed with "RMXBean".
The other technique is to annotate the MBean using the annotations defined in
the annotations package and use the
RMXBeanFactory.createAnnotatedRMXBean(...) method.
| Constructor Summary | |
|---|---|
RMXBeanFactory()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
createAnnotatedRMXBean(java.lang.Object object)
Create RMXBean from annotated object. |
static java.lang.Object |
createStandardRMXBean(java.lang.Object object)
Create StandardRMXBean using "default" management interface. |
static java.lang.Object |
createStandardRMXBean(java.lang.Object object,
java.lang.Class mxInterface)
Create StandardRMXBean with specified management interface. |
static java.lang.Object |
createStandardRMXBean(java.lang.Object object,
java.lang.Class[] mxInterfaces)
Create StandardRMXBean with specified management interfaces. |
static java.lang.Object |
newProxyInstance(javax.management.MBeanServerConnection connection,
javax.management.ObjectName objectName,
java.lang.Class mxType)
Create proxy object for interacting with RMXBean. |
static java.lang.Object |
newProxyInstance(javax.management.MBeanServerConnection connection,
javax.management.ObjectName objectName,
java.lang.ClassLoader classLoader,
java.lang.Class<?>[] mxTypes)
Create proxy object for interacting with RMXBean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RMXBeanFactory()
| Method Detail |
|---|
public static java.lang.Object createAnnotatedRMXBean(java.lang.Object object)
throws javax.management.NotCompliantMBeanException
object - the object.
javax.management.NotCompliantMBeanException - if the object does not conform to
RMXBean specification.
public static java.lang.Object createStandardRMXBean(java.lang.Object object)
throws javax.management.NotCompliantMBeanException
object - the object.
javax.management.NotCompliantMBeanException - if the object does not conform to
RMXBean specification.
public static java.lang.Object createStandardRMXBean(java.lang.Object object,
java.lang.Class mxInterface)
throws javax.management.NotCompliantMBeanException
object - the object.mxInterface - the management interface.
javax.management.NotCompliantMBeanException - if the object does not conform to
RMXBean specification.
public static java.lang.Object createStandardRMXBean(java.lang.Object object,
java.lang.Class[] mxInterfaces)
throws javax.management.NotCompliantMBeanException
object - the object.mxInterfaces - the management interfaces.
javax.management.NotCompliantMBeanException - if the object does not conform to
RMXBean specification.
public static java.lang.Object newProxyInstance(javax.management.MBeanServerConnection connection,
javax.management.ObjectName objectName,
java.lang.Class mxType)
throws javax.management.NotCompliantMBeanException
connection - the MBeanServerConnection.objectName - the name of object on server.mxType - the interface to proxy.
javax.management.NotCompliantMBeanException
public static java.lang.Object newProxyInstance(javax.management.MBeanServerConnection connection,
javax.management.ObjectName objectName,
java.lang.ClassLoader classLoader,
java.lang.Class<?>[] mxTypes)
throws javax.management.NotCompliantMBeanException
connection - the MBeanServerConnection.objectName - the name of object on server.classLoader - the parent classloader of proxy. The mxTypes
must be accessible through ClassLoader.mxTypes - the interfaces to proxy.
javax.management.NotCompliantMBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||