Package org.infinispan.factories
Class AbstractComponentFactory
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentFactory
-
- All Implemented Interfaces:
ComponentFactory
- Direct Known Subclasses:
AbstractNamedCacheComponentFactory,CacheStoreFactoryRegistryFactory,ClusterTopologyManagerFactory,EmptyConstructorFactory,EncoderRegistryFactory,LocalTopologyManagerFactory,MarshallerFactory,NamedComponentFactory,NamedExecutorsFactory,TransportFactory
public abstract class AbstractComponentFactory extends java.lang.Object implements ComponentFactory
Factory that creates components used internally within Infinispan, and also wires dependencies into the components. TheInternalCacheFactoryis a special subclass of this, which bootstraps the construction of other components. When this class is loaded, it maintains a static list of known default factories for known components, which it then delegates to, when actually performing the construction.- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
- See Also:
Inject,ComponentRegistry
-
-
Field Summary
Fields Modifier and Type Field Description protected GlobalComponentRegistryglobalComponentRegistryprotected GlobalConfigurationglobalConfigurationprotected static org.infinispan.util.logging.Loglog
-
Constructor Summary
Constructors Constructor Description AbstractComponentFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidassertTypeConstructable(java.lang.Class<?> requestedType, java.lang.Class<?>... ableToConstruct)<T> Tconstruct(java.lang.Class<T> componentType)Deprecated.Since 9.4, please overrideComponentFactory.construct(String)instead.java.lang.Objectconstruct(java.lang.String name)
-
-
-
Field Detail
-
log
protected static final org.infinispan.util.logging.Log log
-
globalComponentRegistry
protected GlobalComponentRegistry globalComponentRegistry
-
globalConfiguration
protected GlobalConfiguration globalConfiguration
-
-
Method Detail
-
construct
public java.lang.Object construct(java.lang.String name)
- Specified by:
constructin interfaceComponentFactory- Returns:
- Either a component instance or a
ComponentAliaspointing to another component.
-
construct
@Deprecated public <T> T construct(java.lang.Class<T> componentType)
Deprecated.Since 9.4, please overrideComponentFactory.construct(String)instead.Constructs a component.- Parameters:
componentType- type of component- Returns:
- a component
-
assertTypeConstructable
protected void assertTypeConstructable(java.lang.Class<?> requestedType, java.lang.Class<?>... ableToConstruct)
-
-