| Modifier and Type | Field and Description |
|---|---|
| private static final GmbalMBean | |
| pack-priv static final ManagedObjectManager |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAnnotation(AnnotatedElement element, Annotation annotation)
Implements org. Method to add an annotation to an element that cannot be modified. |
| public void | addInheritedAnnotations(Class<?> cls)
Implements org. Add all annotations for this class as if they were declared on the inheritance parent(s) of the class (immediate superclass for a class, all immediate superinterfaces for an interface). |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public GmbalMBean | createRoot()
Implements org. Create a default root MBean. |
| public GmbalMBean | createRoot(Object root)
Implements org. Create a root MBean from root, which much have a method with the @NameValue annotation. |
| public GmbalMBean | createRoot(Object root, String name)
Implements org. Create a root MBean from root with the given name. |
| public String | dumpSkeleton(Object obj)
Implements org. Dump the skeleton used in the implementation of the MBean for obj. |
| public AMXClient | getAMXClient(Object obj)
Implements org. Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom. |
| public String | getDomain()
Implements org. Return the domain name that was used when this ManagedObjectManager was created. |
| public MBeanServer | getMBeanServer()
Implements org. Get the current MBeanServer. |
| public Object | getObject(ObjectName oname)
Implements org. Get the Object that was registered with the given ObjectName. |
| public ObjectName | getObjectName(Object obj)
Implements org. Get the ObjectName for the given object (which must have been registered via a register call). |
| public ObjectRegistrationManager | getObjectRegistrationManager()
Implements org. Return an ObjectRegistrationManager as required in the pfl timer services. |
| public ResourceBundle | getResourceBundle()
Implements org. Get the resource bundle (if any) set by setResourceBundle. |
| public Object | getRoot()
Implements org. Return the root of this ManagedObjectManager. |
| public boolean | isManagedObject(Object obj)
Implements org. Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false. |
| public GmbalMBean | register(Object parent, Object obj, String name)
Implements org. Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName. |
| public GmbalMBean | register(Object parent, Object obj)
Implements org. Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation. |
| public GmbalMBean | registerAtRoot(Object obj, String name)
Implements org. Registers the MBean for obj at the root MBean for the ObjectManager, using the given name. |
| public GmbalMBean | registerAtRoot(Object obj)
Implements org. Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation. |
| public void | resumeJMXRegistration()
Implements org. Decrements the suspend counter, if the counter is greater than 0. |
| public void | setJMXRegistrationDebug(boolean flag)
Implements org. Set debugging for JMX registrations. |
| public void | setMBeanServer(MBeanServer server)
Implements org. Set the MBeanServer to which all MBeans using this interface are published. |
| public void | setRegistrationDebug(ManagedObjectManager.
Implements org. Print debug output to System.out. |
| public void | setResourceBundle(ResourceBundle rb)
Implements org. Set the ResourceBundle to use for getting localized descriptions. |
| public void | setRuntimeDebug(boolean flag)
Implements org. Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger. |
| public void | setTypelibDebug(int level)
Implements org. Enabled generation of debug log for type evaluator debugging. |
| public void | stripPackagePrefix()
Implements org. Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name. |
| public void | stripPrefix(String... str)
Implements org. Add a type prefix to strip from type names, to shorten the names for a better presentation to the user. |
| public void | suppressDuplicateRootReport(boolean suppressReport)
Implements org. Suppress reporting of a duplicate root name. |
| public void | suspendJMXRegistration()
Implements org. If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called. |
| public void | unregister(Object obj)
Implements org. Unregister the Open MBean corresponding to obj from the mbean server. |
| gmb | back to summary |
|---|---|
| private static final GmbalMBean gmb | |
| self | back to summary |
|---|---|
| pack-priv static final ManagedObjectManager self | |
| ManagedObjectManagerNOPImpl | back to summary |
|---|---|
| private ManagedObjectManagerNOPImpl() | |
| addAnnotation | back to summary |
|---|---|
| public void addAnnotation(AnnotatedElement element, Annotation annotation) Implements org. Doc from org. Method to add an annotation to an element that cannot be modified. This is typically needed when dealing with an implementation of an interface that is part of a standardized API, and so the interface cannot be annotated by modifiying the source code. In some cases the implementation of the interface also cannot be inherited, because the implementation is generated by a standardized code generator. Another possibility is that there are several different implementations of the standardized interface, and it is undesirable to annotate each implementation with @InheritedAttributes. | |
| addInheritedAnnotations | back to summary |
|---|---|
| public void addInheritedAnnotations(Class<?> cls) Implements org. Doc from org. Add all annotations for this class as if they were declared on the inheritance parent(s) of the class (immediate superclass for a class, all immediate superinterfaces for an interface). Also add all method annotations for methods that override an inherited method. This acts as if all annotations on cls were actually applied to the immediate super class or interface. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| createRoot | back to summary |
|---|---|
| public GmbalMBean createRoot() Implements org. Doc from org. Create a default root MBean. One of the createRoot methods must be called before any of the registration methods may be called. Only one call to a createRoot method is permitted after an ManagedObjectManager is created. | |
| createRoot | back to summary |
|---|---|
| public GmbalMBean createRoot(Object root) Implements org. Doc from org. Create a root MBean from root, which much have a method with the @NameValue annotation. One of the createRoot methods must be called before any of the registration methods may be called. Only one call to createRoot is permitted after an ManagedObjectManager is created. | |
| createRoot | back to summary |
|---|---|
| public GmbalMBean createRoot(Object root, String name) Implements org. Doc from org. Create a root MBean from root with the given name. One of the createRoot methods must be called before any of the registration methods may be called. Only one call to createRoot is permitted after an ManagedObjectManager is created. | |
| dumpSkeleton | back to summary |
|---|---|
| public String dumpSkeleton(Object obj) Implements org. Doc from org. Dump the skeleton used in the implementation of the MBean for obj. Obj must be currently registered. Must be called after a successful call to a createRoot method. | |
| getAMXClient | back to summary |
|---|---|
| public AMXClient getAMXClient(Object obj) Implements org. Doc from org. Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom. Must be called after a successful createRoot call. | |
| getDomain | back to summary |
|---|---|
| public String getDomain() Implements org. Doc from org. Return the domain name that was used when this ManagedObjectManager was created. This is the JMX domain that will be used in all ObjectNames created by this ManagedObjectManager. May be called at any time. | |
| getMBeanServer | back to summary |
|---|---|
| public MBeanServer getMBeanServer() Implements org. Doc from org. Get the current MBeanServer. May be called at any time. | |
| getObject | back to summary |
|---|---|
| public Object getObject(ObjectName oname) Implements org. Doc from org. Get the Object that was registered with the given ObjectName. Note that getObject and getObjectName are inverse operations. Must be called after a successful createRoot call. | |
| getObjectName | back to summary |
|---|---|
| public ObjectName getObjectName(Object obj) Implements org. Doc from org. Get the ObjectName for the given object (which must have been registered via a register call). Must be called after a successful createRoot call. | |
| getObjectRegistrationManager | back to summary |
|---|---|
| public ObjectRegistrationManager getObjectRegistrationManager() Implements org. Doc from org. Return an ObjectRegistrationManager as required in the pfl timer services. Can be called at any time. | |
| getResourceBundle | back to summary |
|---|---|
| public ResourceBundle getResourceBundle() Implements org. Doc from org. Get the resource bundle (if any) set by setResourceBundle. May be called at any time. | |
| getRoot | back to summary |
|---|---|
| public Object getRoot() Implements org. Doc from org. Return the root of this ManagedObjectManager. May be called at any time. | |
| isManagedObject | back to summary |
|---|---|
| public boolean isManagedObject(Object obj) Implements org. Doc from org. Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false. Only such objects may be registered to create MBeans. May be called at any time. | |
| register | back to summary |
|---|---|
| public GmbalMBean register(Object parent, Object obj, String name) Implements org. Doc from org. Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName. The MBeanServer from setMBeanServer (or its default) is used. Here parent is considered to contain obj, and this containment is represented by the construction of the ObjectName following the AMX specification for ObjectNames. The MBeanInfo for the result is actually ModelMBeanInfo, and may contain extra metadata as defined using annotations defined with the @DescriptorKey and @DescriptorField meta-annotations. Must be called after a successful createRoot call. This version of register should not be used to register singletons. | |
| register | back to summary |
|---|---|
| public GmbalMBean register(Object parent, Object obj) Implements org. Doc from org. Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation. This version of register should also be used to register singletons. | |
| registerAtRoot | back to summary |
|---|---|
| public GmbalMBean registerAtRoot(Object obj, String name) Implements org. Doc from org. Registers the MBean for obj at the root MBean for the ObjectManager, using the given name. Exactly the same as mom.register( mom.getRoot(), obj, name ). Must be called after a successful createRoot call. This version of register should not be used to register singletons. | |
| registerAtRoot | back to summary |
|---|---|
| public GmbalMBean registerAtRoot(Object obj) Implements org. Doc from org. Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation. Exactly the same as mom.register( mom.getRoot(), obj ). This version of register should also be used to register singletons. | |
| resumeJMXRegistration | back to summary |
|---|---|
| public void resumeJMXRegistration() Implements org. Doc from org. Decrements the suspend counter, if the counter is greater than 0. When the counter goes to zero, it causes all MBeans created since a previous call to suspendJMXRegistration incremented the counter from 0 to 1 to be registered with the JMX MBeanServer. After this call, all new MBean registration calls to the JMX MBeanServer happen within the register call. May be called at any time. | |
| setJMXRegistrationDebug | back to summary |
|---|---|
| public void setJMXRegistrationDebug(boolean flag) Implements org. Doc from org. Set debugging for JMX registrations. If true, all registrations and deregistrations with the MBeanServer are traced. | |
| setMBeanServer | back to summary |
|---|---|
| public void setMBeanServer(MBeanServer server) Implements org. Doc from org. Set the MBeanServer to which all MBeans using this interface are published. The default value is java.lang.management.ManagementFactory.getPlatformMBeanServer(). Must be called before a successful createRoot call. | |
| setRegistrationDebug | back to summary |
|---|---|
| public void setRegistrationDebug(ManagedObjectManager. Implements org. Doc from org. Print debug output to System.out. May be called at any time. | |
| setResourceBundle | back to summary |
|---|---|
| public void setResourceBundle(ResourceBundle rb) Implements org. Doc from org. Set the ResourceBundle to use for getting localized descriptions. If not set, the description is the value in the annotation. Must be called before a successful call to a createRoot method. | |
| setRuntimeDebug | back to summary |
|---|---|
| public void setRuntimeDebug(boolean flag) Implements org. Doc from org. Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger. May be called at any time. | |
| setTypelibDebug | back to summary |
|---|---|
| public void setTypelibDebug(int level) Implements org. Doc from org. Enabled generation of debug log for type evaluator debugging. This happens as part of the registration process for the first time a particular class is processed. May be called at any time. | |
| stripPackagePrefix | back to summary |
|---|---|
| public void stripPackagePrefix() Implements org. Doc from org. Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name. Otherwise, the full Class name is the type. | |
| stripPrefix | back to summary |
|---|---|
| public void stripPrefix(String... str) Implements org. Doc from org. Add a type prefix to strip from type names, to shorten the names for a better presentation to the user. This may only be called before a createRot method is called. | |
| suppressDuplicateRootReport | back to summary |
|---|---|
| public void suppressDuplicateRootReport(boolean suppressReport) Implements org. Doc from org. Suppress reporting of a duplicate root name. If this option is enabled, createRoot( Object ) and createRoot( Object, String ) will return null for a duplicate root name, otherwise a Gmbal error will be reported. Note that this applies ONLY to createRoot: the register methods are unaffected. Also note that any other errors that might occur on createRoot will be reported normally. Must be called before a successful call to a createRoot method. | |
| suspendJMXRegistration | back to summary |
|---|---|
| public void suspendJMXRegistration() Implements org. Doc from org. If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called. Each call increments a counter, so that nested and overlapping calls from multiple threads work correctly. May be called at any time. | |
| unregister | back to summary |
|---|---|
| public void unregister(Object obj) Implements org. Doc from org. Unregister the Open MBean corresponding to obj from the mbean server. Must be called after a successful createRoot call. | |