Package org.infinispan.factories.components

Examples of org.infinispan.factories.components.ComponentMetadata


   }

   private List<ResourceDMBean> getResourceDMBeansFromComponents() throws NoSuchFieldException, ClassNotFoundException {
      List<ResourceDMBean> resourceDMBeans = new ArrayList<ResourceDMBean>();
      for (ComponentRegistry.Component component : components) {
         ComponentMetadata md = component.getMetadata();
         if (md.isManageable()) {
            ResourceDMBean resourceDMBean = new ResourceDMBean(component.getInstance(), md.toManageableComponentMetadata());
               resourceDMBeans.add(resourceDMBean);
         }
      }
      return resourceDMBeans;
   }
View Full Code Here


    * @throws ConfigurationException if there is a problem wiring the instance
    */
   public void wireDependencies(Object target) throws ConfigurationException {
      try {
         Class targetClass = target.getClass();
         ComponentMetadata metadata = ComponentMetadataRepo.findComponentMetadata(targetClass);
         if (metadata != null && metadata.getInjectMethods() != null && metadata.getInjectMethods().length != 0) {
            // search for anything we need to inject
            for (ComponentMetadata.InjectMetadata injectMetadata : metadata.getInjectMethods()) {
               Class[] methodParameters = injectMetadata.getParameterClasses();
               if (methodParameters == null) {
                  methodParameters = ReflectionUtil.toClassArray(injectMetadata.getParameters());
                  injectMetadata.setParameterClasses(methodParameters);
               }
View Full Code Here

         super.registerComponentInternal(component, name, nameIsFQCN);
      }
   }

   private boolean isGlobal(String className) {
      ComponentMetadata m = ComponentMetadataRepo.findComponentMetadata(className);
      return m != null && m.isGlobalScope();
   }
View Full Code Here

      }
      return super.createComponentFactoryInternal(componentClass, cfClass);
   }

   private boolean isGlobal(String className) {
      ComponentMetadata m = getComponentMetadataRepo().findComponentMetadata(className);
      return m != null && m.isGlobalScope();
   }
View Full Code Here

      }
      return super.createComponentFactoryInternal(componentClass, cfClass);
   }

   private boolean isGlobal(String className) {
      ComponentMetadata m = getComponentMetadataRepo().findComponentMetadata(className);
      return m != null && m.isGlobalScope();
   }
View Full Code Here

    * @throws CacheConfigurationException if there is a problem wiring the instance
    */
   public void wireDependencies(Object target) throws CacheConfigurationException {
      try {
         Class<?> targetClass = target.getClass();
         ComponentMetadata metadata = getComponentMetadataRepo().findComponentMetadata(targetClass);
         if (metadata != null && metadata.getInjectMethods() != null && metadata.getInjectMethods().length != 0) {
            // search for anything we need to inject
            for (ComponentMetadata.InjectMetadata injectMetadata : metadata.getInjectMethods()) {
               Class<?>[] methodParameters = injectMetadata.getParameterClasses();
               if (methodParameters == null) {
                  methodParameters = ReflectionUtil.toClassArray(injectMetadata.getParameters(), getClassLoader());
                  injectMetadata.setParameterClasses(methodParameters);
               }
View Full Code Here

   }

   private List<ResourceDMBean> getResourceDMBeansFromComponents() throws NoSuchFieldException, ClassNotFoundException {
      List<ResourceDMBean> resourceDMBeans = new ArrayList<ResourceDMBean>(components.size());
      for (ComponentRegistry.Component component : components) {
         ComponentMetadata md = component.getMetadata();
         if (md.isManageable()) {
            ResourceDMBean resourceDMBean = new ResourceDMBean(component.getInstance(), md.toManageableComponentMetadata());
            resourceDMBeans.add(resourceDMBean);
         }
      }
      return resourceDMBeans;
   }
View Full Code Here

   private void printComponentStats(PrintWriter pw, Cache<?, ?> cache, Object component) {
      if (component == null) {
         return;
      }
      ComponentMetadataRepo mr = cache.getAdvancedCache().getComponentRegistry().getComponentMetadataRepo();
      ComponentMetadata cm = mr.findComponentMetadata(component.getClass().getName());
      if (cm == null || !(cm instanceof ManageableComponentMetadata)) {
         return;
      }
      ManageableComponentMetadata mcm = cm.toManageableComponentMetadata();
      pw.printf("%s: {\n", mcm.getJmxObjectName());
      for (JmxAttributeMetadata s : mcm.getAttributeMetadata()) {
         pw.printf("  %s: %s\n", s.getName(), getAttributeValue(component, s));
      }
      pw.println("}");
View Full Code Here

    * @throws ConfigurationException if there is a problem wiring the instance
    */
   public void wireDependencies(Object target) throws CacheConfigurationException {
      try {
         Class<?> targetClass = target.getClass();
         ComponentMetadata metadata = getComponentMetadataRepo().findComponentMetadata(targetClass);
         if (metadata != null && metadata.getInjectMethods() != null && metadata.getInjectMethods().length != 0) {
            // search for anything we need to inject
            for (ComponentMetadata.InjectMetadata injectMetadata : metadata.getInjectMethods()) {
               Class<?>[] methodParameters = injectMetadata.getParameterClasses();
               if (methodParameters == null) {
                  methodParameters = ReflectionUtil.toClassArray(injectMetadata.getParameters(), getClassLoader());
                  injectMetadata.setParameterClasses(methodParameters);
               }
View Full Code Here

      }
      return super.createComponentFactoryInternal(componentClass, cfClass);
   }

   private boolean isGlobal(String className) {
      ComponentMetadata m = getComponentMetadataRepo().findComponentMetadata(className);
      return m != null && m.isGlobalScope();
   }
View Full Code Here

TOP

Related Classes of org.infinispan.factories.components.ComponentMetadata

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.