Package org.gatein.management.api.annotations

Examples of org.gatein.management.api.annotations.Managed


   public ComponentRegistration registerManagedComponent(Class<?> component)
   {
      boolean debug = log.isDebugEnabled();
      if (debug) log.debug("Processing managed annotations for class " + component);

      Managed managed = component.getAnnotation(Managed.class);
      if (managed == null) throw new RuntimeException(Managed.class + " annotation not present on " + component);

      String componentName = managed.value();
      if ("".equals(componentName)) throw new RuntimeException(Managed.class + " annotation must have a value (path) for component class " + component);
      if (debug) log.debug("Registering managed component " + componentName);

      ComponentRegistration registration = registerManagedComponent(componentName);
      registration.registerManagedResource(description(managed.description()));

      // Register resources & operations
      AnnotatedResource annotatedResource = new AnnotatedResource(component);
      annotatedResource.register(rootResource);
View Full Code Here


      final boolean debug = log.isDebugEnabled();
      if (debug) log.debug("Registering operation " + operationName + " for path " + resource.getPath());

      Class<?> returnType = method.getReturnType();
      Managed subManaged = returnType.getAnnotation(Managed.class);
      if (subManaged != null)
      {
         if ("".equals(subManaged.value()))
         {
            AnnotatedResource ar = new AnnotatedResource(returnType, owner, this);
            ar.register(resource);
         }
         else
View Full Code Here

TOP

Related Classes of org.gatein.management.api.annotations.Managed

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.