org.infinispan.factories.components
Class ComponentMetadata

java.lang.Object
  extended by org.infinispan.factories.components.ComponentMetadata
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ManageableComponentMetadata

public class ComponentMetadata
extends Object
implements Serializable

This class contains all of the metadata and implications expressed via the Scope, SurvivesRestarts, DefaultFactoryFor, ComponentName, Inject, Start and Stop annotations. Instead of scanning for these annotations and working out dependency chains at runtime "on-demand", since Infinispan 5.1, this process now happens offline, at build-time.

When compiling Infinispan, components and their dependency chains are inspected and the information expressed by the annotations above are denormalized and a series of ComponentMetadata objects are created and persisted in the Infinispan jar.

This metadata is then read in by the ComponentMetadataRepo at runtime, and used by the ComponentRegistry and other factory-like classes to bootstrap an Infinispan node.

Also see ManageableComponentMetadata for components that also expose JMX information.

Since:
5.1
Author:
Manik Surtani
See Also:
ManageableComponentMetadata, ComponentMetadataRepo, Serialized Form

Nested Class Summary
static class ComponentMetadata.InjectMetadata
          This class encapsulates metadata on an inject method, such as one annotated with Inject
static class ComponentMetadata.PrioritizedMethodMetadata
          This class encapsulates metadata on a prioritized method, such as one annotated with Start or @Stop
 
Field Summary
static ComponentMetadata.InjectMetadata[] EMPTY_INJECT_METHODS
           
static ComponentMetadata.PrioritizedMethodMetadata[] EMPTY_PRIORITIZED_METHODS
           
 
Constructor Summary
ComponentMetadata(Class<?> component, List<Method> injectMethods, List<Method> startMethods, List<Method> stopMethods, boolean global, boolean survivesRestarts)
           
 
Method Summary
 Class<?> getClazz()
           
 Map<String,String> getDependencies()
           
 ComponentMetadata.InjectMetadata[] getInjectMethods()
           
 String getName()
           
 ComponentMetadata.PrioritizedMethodMetadata[] getStartMethods()
           
 ComponentMetadata.PrioritizedMethodMetadata[] getStopMethods()
           
 boolean isGlobalScope()
           
 boolean isManageable()
           
 boolean isSurvivesRestarts()
           
 ManageableComponentMetadata toManageableComponentMetadata()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_INJECT_METHODS

public static final ComponentMetadata.InjectMetadata[] EMPTY_INJECT_METHODS

EMPTY_PRIORITIZED_METHODS

public static final ComponentMetadata.PrioritizedMethodMetadata[] EMPTY_PRIORITIZED_METHODS
Constructor Detail

ComponentMetadata

public ComponentMetadata(Class<?> component,
                         List<Method> injectMethods,
                         List<Method> startMethods,
                         List<Method> stopMethods,
                         boolean global,
                         boolean survivesRestarts)
Method Detail

getName

public String getName()

getDependencies

public Map<String,String> getDependencies()

getInjectMethods

public ComponentMetadata.InjectMetadata[] getInjectMethods()

getStartMethods

public ComponentMetadata.PrioritizedMethodMetadata[] getStartMethods()

getStopMethods

public ComponentMetadata.PrioritizedMethodMetadata[] getStopMethods()

isGlobalScope

public boolean isGlobalScope()

isSurvivesRestarts

public boolean isSurvivesRestarts()

isManageable

public boolean isManageable()

getClazz

public Class<?> getClazz()

toManageableComponentMetadata

public ManageableComponentMetadata toManageableComponentMetadata()

toString

public String toString()
Overrides:
toString in class Object

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.