Top Inners Fields Constructors Methods
org.glassfish.gmbal.impl

public Class ManagedObjectManagerImpl

extends Object
implements ManagedObjectManagerInternal
Class Inheritance
All Implemented Interfaces
org.glassfish.gmbal.impl.ManagedObjectManagerInternal, org.glassfish.gmbal.ManagedObjectManager, java.io.Closeable, java.lang.AutoCloseable
Annotations
@TraceRegistration
@TraceRegistrationFine
Imports
java.io.IOException, .Serializable, java.lang.annotation.Annotation, java.lang.management.ManagementFactory, java.lang.reflect.AnnotatedElement, .Field, .Method, .Modifier, java.security.AccessController, .PrivilegedAction, .PrivilegedActionException, .PrivilegedExceptionAction, java.util.ArrayList, .Arrays, .Collection, .Comparator, .HashMap, .HashSet, .List, .Map, .ResourceBundle, .Set, .SortedSet, .TreeSet, .WeakHashMap, javax.management.JMException, .MBeanAttributeInfo, .MBeanServer, .ObjectName, org.glassfish.external.amx.AMX, org.glassfish.external.statistics.AverageRangeStatistic, .BoundaryStatistic, .BoundedRangeStatistic, .CountStatistic, .RangeStatistic, .Statistic, .StringStatistic, .TimeStatistic, org.glassfish.gmbal.AMXClient, .AMXMBeanInterface, .AMXMetadata, .Description, .GmbalMBean, .IncludeSubclass, .InheritedAttribute, .InheritedAttributes, .ManagedAttribute, .ManagedData, .ManagedObject, .ManagedObjectManager, org.glassfish.gmbal.impl.trace.TraceRegistration, .TraceRegistrationFine, org.glassfish.gmbal.typelib.EvaluatedClassAnalyzer, .EvaluatedClassDeclaration, .EvaluatedDeclaration, .EvaluatedFieldDeclaration, .EvaluatedMethodDeclaration, .EvaluatedType, .TypeEvaluator, org.glassfish.pfl.basic.algorithm.Algorithms, .ClassAnalyzer, .DelayedObjectToString, .DumpIgnore, .ObjectUtility, org.glassfish.pfl.basic.contain.Pair, org.glassfish.pfl.basic.facet.FacetAccessor, .FacetAccessorImpl, org.glassfish.pfl.basic.func.UnaryFunction, .UnaryPredicate, org.glassfish.pfl.tf.spi.annotation.InfoMethod, org.glassfish.pfl.tf.timer.spi.ObjectRegistrationManager

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
ManagedObjectManagerImpl.ADHolder

References Deprecated UnaryPredicate is deprecated or references (maybe indirectly) at least one deprecated element.
public static class
public static interface
public static interface
public static interface
public static interface
public static interface
public static interface
public static interface
public static interface
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final Map<AnnotatedElement, Map<Class<T>, Annotation>>
private final Set<String>
private final MBeanSkeleton
private Map<AnnotatedElement, Map<Class<T>, Annotation>>
private static final AMXMetadata
private final String
private boolean
private static ObjectUtility
private final ObjectRegistrationManager
private ManagedObjectManager.RegistrationDebugLevel
private ResourceBundle
private static Comparator<String>
private boolean
private boolean
private MBeanServer
private final Map<EvaluatedClassDeclaration, MBeanSkeleton>
pack-priv List<Pair<Class<T>, Class<T>>>
private boolean
private final MBeanTree
private final Map<EvaluatedType, TypeConverter>
private final SortedSet<String>

Constructor Summary

AccessConstructor and Description
private
ManagedObjectManagerImpl(final String domain, final ObjectName rootParentName)

public
public
ManagedObjectManagerImpl(final ObjectName rootParentName)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
addAnnotation(AnnotatedElement element, Annotation annotation)

Implements org.glassfish.gmbal.ManagedObjectManager.addAnnotation.

Method to add an annotation to an element that cannot be modified.

private void
public synchronized void
addInheritedAnnotations(final Class<?> cls)

Implements org.glassfish.gmbal.ManagedObjectManager.addInheritedAnnotations.

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).

pack-priv static void
private synchronized void
private synchronized void
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public synchronized MBeanImpl
public synchronized GmbalMBean
createRoot()

Implements org.glassfish.gmbal.ManagedObjectManager.createRoot.

Create a default root MBean.

public synchronized GmbalMBean
createRoot(Object root)

Implements org.glassfish.gmbal.ManagedObjectManager.createRoot.

Create a root MBean from root, which much have a method with the @NameValue annotation.

public synchronized GmbalMBean
createRoot(Object root, String name)

Implements org.glassfish.gmbal.ManagedObjectManager.createRoot.

Create a root MBean from root with the given name.

private void
describe(String msg, Object data)

public synchronized String
dumpSkeleton(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.dumpSkeleton.

Dump the skeleton used in the implementation of the MBean for obj.

public synchronized <T extends EvaluatedDeclaration> UnaryPredicate<T>
forAnnotation(final Class<? extends Annotation> annotation, final Class<T> cls)

Implements org.glassfish.gmbal.impl.ManagedObjectManagerInternal.forAnnotation.

References Deprecated UnaryPredicate is deprecated or references (maybe indirectly) at least one deprecated element.

private Map<Class<T>, Annotation>
getAllAnnotations(final Class<T> cls)

public AMXClient
getAMXClient(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.getAMXClient.

Get an AMXClient instance for the object obj, if obj is registered as an MBean in this mom.

private String
getAMXTypeFromField(Class<?> cls, String fieldName)

public synchronized <T extends Annotation> T
public synchronized Collection<Annotation>
private AttributeDescriptor
public synchronized Pair<Map<String, AttributeDescriptor>, Map<String, AttributeDescriptor>>
public synchronized Pair<EvaluatedClassDeclaration, EvaluatedClassAnalyzer>
getClassAnalyzer(final EvaluatedClassDeclaration cls, final Class<? extends Annotation> annotationClass)

Implements org.glassfish.gmbal.impl.ManagedObjectManagerInternal.getClassAnalyzer.

Find the superclass or superinterface of cls (which may be cls itself) that has the given annotationClass as an annotation.

private static Field
getDeclaredField(final Class<?> cls, final String name)

public AMXMetadata
public synchronized String
public synchronized String
getDomain()

Implements org.glassfish.gmbal.ManagedObjectManager.getDomain.

Return the domain name that was used when this ManagedObjectManager was created.

public synchronized FacetAccessor
public <T extends Annotation> T
public synchronized List<InheritedAttribute>
getInheritedAttributes(final EvaluatedClassAnalyzer ca)

Implements org.glassfish.gmbal.impl.ManagedObjectManagerInternal.getInheritedAttributes.

Get the inherited attributes from the EvaluatedClassAnalyzer.

public synchronized MBeanServer
public synchronized Object
getObject(ObjectName oname)

Implements org.glassfish.gmbal.ManagedObjectManager.getObject.

Get the Object that was registered with the given ObjectName.

public synchronized ObjectName
getObjectName(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.getObjectName.

Get the ObjectName for the given object (which must have been registered via a register call).

public ObjectRegistrationManager
getObjectRegistrationManager()

Implements org.glassfish.gmbal.ManagedObjectManager.getObjectRegistrationManager.

Return an ObjectRegistrationManager as required in the pfl timer services.

public synchronized ResourceBundle
getResourceBundle()

Implements org.glassfish.gmbal.ManagedObjectManager.getResourceBundle.

Get the resource bundle (if any) set by setResourceBundle.

public synchronized Object
getRoot()

Implements org.glassfish.gmbal.ManagedObjectManager.getRoot.

Return the root of this ManagedObjectManager.

public synchronized ObjectName
private synchronized MBeanSkeleton
public synchronized TypeConverter
getTypeConverter(EvaluatedType type)

Implements org.glassfish.gmbal.impl.ManagedObjectManagerInternal.getTypeConverter.

Construct or lookup the TypeConverter for the given type.

public synchronized String
private boolean
private void
init()

private void
public boolean
public synchronized boolean
isManagedObject(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.isManagedObject.

Return true if object is assignment compatible with a class or interface that has an @ManagedObject annotation, otherwise false.

public synchronized boolean
private void
public synchronized <K, V> void
putIfNotPresent(final Map<K, V> map, final K key, final V value)

Implements org.glassfish.gmbal.impl.ManagedObjectManagerInternal.putIfNotPresent.

public synchronized GmbalMBean
register(final Object parent, final Object obj, final String name)

Implements org.glassfish.gmbal.ManagedObjectManager.register.

Construct an Open Mean for obj according to its annotations, and register it with domain getDomain() and the appropriate ObjectName.

public synchronized GmbalMBean
register(final Object parent, final Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.register.

Same as register( parent, obj, name ), but here the name is derived from an @NameValue annotation.

public synchronized GmbalMBean
registerAtRoot(Object obj, String name)

Implements org.glassfish.gmbal.ManagedObjectManager.registerAtRoot.

Registers the MBean for obj at the root MBean for the ObjectManager, using the given name.

public synchronized GmbalMBean
registerAtRoot(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.registerAtRoot.

Same as registerAtRoot( Object, String ), but here the name is derived from an @ObjectKeyName annotation.

public synchronized boolean
public synchronized boolean
public synchronized void
resumeJMXRegistration()

Implements org.glassfish.gmbal.ManagedObjectManager.resumeJMXRegistration.

Decrements the suspend counter, if the counter is greater than 0.

public synchronized boolean
public synchronized void
setJMXRegistrationDebug(boolean flag)

Implements org.glassfish.gmbal.ManagedObjectManager.setJMXRegistrationDebug.

Set debugging for JMX registrations.

public synchronized void
setMBeanServer(MBeanServer server)

Implements org.glassfish.gmbal.ManagedObjectManager.setMBeanServer.

Set the MBeanServer to which all MBeans using this interface are published.

public synchronized void
public synchronized void
setResourceBundle(ResourceBundle rb)

Implements org.glassfish.gmbal.ManagedObjectManager.setResourceBundle.

Set the ResourceBundle to use for getting localized descriptions.

public synchronized void
setRuntimeDebug(boolean flag)

Implements org.glassfish.gmbal.ManagedObjectManager.setRuntimeDebug.

Enable generation of debug log at INFO level for runtime MBean operations to the org.glassfish.gmbal.impl logger.

public synchronized void
setTypelibDebug(int level)

Implements org.glassfish.gmbal.ManagedObjectManager.setTypelibDebug.

Enabled generation of debug log for type evaluator debugging.

public synchronized void
stripPackagePrefix()

Implements org.glassfish.gmbal.ManagedObjectManager.stripPackagePrefix.

Change the default type name algorithm so that if nothing else applies, the entire package prefix is stripped form the Class name.

public synchronized void
stripPrefix(String... args)

Implements org.glassfish.gmbal.ManagedObjectManager.stripPrefix.

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.glassfish.gmbal.ManagedObjectManager.suppressDuplicateRootReport.

Suppress reporting of a duplicate root name.

public synchronized void
suspendJMXRegistration()

Implements org.glassfish.gmbal.ManagedObjectManager.suspendJMXRegistration.

If called, no MBeans created after this call will be registered with the JMX MBeanServer until resumeJMXRegistration is called.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public synchronized void
unregister(Object obj)

Implements org.glassfish.gmbal.ManagedObjectManager.unregister.

Unregister the Open MBean corresponding to obj from the mbean server.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait