Package org.glassfish.gmbal

Examples of org.glassfish.gmbal.AMXMetadata


        return AMXGlassfish.DEFAULT.newObjectName(PARENT_PATH, typeValue, nameValue);
    }

    public String getTypeValue(Object statsProvider) {
        String type = null;
        AMXMetadata am = statsProvider.getClass().getAnnotation(AMXMetadata.class);
        if (am != null) {
            type = am.type();
        }
        if (type == null) {
            type = statsProvider.getClass().getSimpleName();
        }
        return type;
View Full Code Here


        return AMXGlassfish.DEFAULT.newObjectName(PARENT_PATH, typeValue, nameValue);
    }

    public String getTypeValue(Object statsProvider) {
        String type = null;
        AMXMetadata am = statsProvider.getClass().getAnnotation(AMXMetadata.class);
        if (am != null) {
            type = am.type();
        }
        if (type == null) {
            type = statsProvider.getClass().getSimpleName();
        }
        return type;
View Full Code Here

        return AMXGlassfish.DEFAULT.newObjectName(PARENT_PATH, typeValue, nameValue);
    }

    public String getTypeValue(Object statsProvider) {
        String type = null;
        AMXMetadata am = statsProvider.getClass().getAnnotation(AMXMetadata.class);
        if (am != null) {
            type = am.type();
        }
        if (type == null) {
            type = statsProvider.getClass().getSimpleName();
        }
        return type;
View Full Code Here

            final Class<?> cls = obj.getClass() ;
            final EvaluatedClassDeclaration cdecl =
                (EvaluatedClassDeclaration)TypeEvaluator.getEvaluatedType(cls) ;
            final MBeanSkeleton skel = getSkeleton( cdecl ) ;

            AMXMetadata amd = getFirstAnnotationOnClass( cdecl, AMXMetadata.class ) ;
            if (amd == null) {
                amd = getDefaultAMXMetadata() ;
            }

            String type = skel.getType() ;
      mm.info( registrationDebug(), "Stripped type", type ) ;

            result = new MBeanImpl( skel, obj, server, type ) ;
           
            if (objName == null) {
                objName = skel.getNameValue( result ) ;
                if (objName == null) {
                    objName = "" ;
                }
            } 

            if (objName.length() == 0) {
                if (!amd.isSingleton()) {
                    throw Exceptions.self.nonSingletonRequiresName(
                        parentEntity, type ) ;
                }
            } else {
                if (amd.isSingleton()) {
                    throw Exceptions.self.singletonCannotSpecifyName(
                        parentEntity, type, name ) ;
                }
            }
          
View Full Code Here

TOP

Related Classes of org.glassfish.gmbal.AMXMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.