Examples of Managed


Examples of io.dropwizard.lifecycle.Managed

                .withId(host + ":" + port)
                .withPayload(env.getObjectMapper().writeValueAsString(payload))
                .build();

        final CuratorFramework curator = config.getZooKeeperConfiguration().newManagedCurator(env.lifecycle());
        env.lifecycle().manage(new Managed() {
            ZooKeeperServiceRegistry registry = new ZooKeeperServiceRegistry(curator, env.metrics());

            @Override
            public void start() throws Exception {
                registry.register(endPoint);
View Full Code Here

Examples of org.exoplatform.management.annotations.Managed

      {
         throw new NullPointerException();
      }

      //
      Managed mb = AnnotationIntrospector.resolveClassAnnotations(clazz, Managed.class);

      //
      this.clazz = clazz;
      this.buildable = mb != null;
   }
View Full Code Here

Examples of org.exoplatform.management.annotations.Managed

      {
         throw new NullPointerException();
      }

      //
      Managed mb = AnnotationIntrospector.resolveClassAnnotations(clazz, Managed.class);

      //
      this.clazz = clazz;
      this.buildable = mb != null;
   }
View Full Code Here

Examples of org.exoplatform.management.annotations.Managed

      {
         throw new IllegalArgumentException("The clazz cannot be null");
      }

      //
      Managed mb = AnnotationIntrospector.resolveClassAnnotations(clazz, Managed.class);

      //
      this.clazz = clazz;
      this.buildable = mb != null;
   }
View Full Code Here

Examples of org.exoplatform.management.annotations.Managed

      {
         throw new NullPointerException();
      }

      //
      Managed mb = AnnotationIntrospector.resolveClassAnnotations(clazz, Managed.class);

      //
      this.clazz = clazz;
      this.buildable = mb != null;
   }
View Full Code Here

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

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

      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

Examples of org.weakref.jmx.Managed

            throws InvocationTargetException, IllegalAccessException
    {
        Collection<String> thisNameList = nameMap.get(clazz.getName());
        if (thisNameList != null) {
            for (Method method : clazz.getMethods()) {
                Managed configAnnotation = method.getAnnotation(Managed.class);
                if (configAnnotation != null) {
                    for (String thisName : thisNameList) {
                        builder.add(new InspectorRecord(thisName, method.getName(), configAnnotation.description(), getType(method)));
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.weakref.jmx.Managed

            throws InvocationTargetException, IllegalAccessException
    {
        Collection<String> thisNameList = nameMap.get(clazz.getName());
        if (thisNameList != null) {
            for (Method method : clazz.getMethods()) {
                Managed configAnnotation = method.getAnnotation(Managed.class);
                if (configAnnotation != null) {
                    for (String thisName : thisNameList) {
                        builder.add(new InspectorRecord(thisName, method.getName(), configAnnotation.description(), getType(method)));
                    }
                }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.