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 Object implements ComponentFactory
Factory that creates components used internally within Infinispan, and also wires dependencies into the components. TheInternalCacheFactory
is 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 GlobalComponentRegistry
globalComponentRegistry
protected GlobalConfiguration
globalConfiguration
protected static org.infinispan.util.logging.Log
log
-
Constructor Summary
Constructors Constructor Description AbstractComponentFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
assertTypeConstructable(Class<?> requestedType, Class<?>... ableToConstruct)
<T> T
construct(Class<T> componentType)
Deprecated.Since 9.4, please overrideComponentFactory.construct(String)
instead.Object
construct(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 Object construct(String name)
- Specified by:
construct
in interfaceComponentFactory
- Returns:
- Either a component instance or a
ComponentAlias
pointing to another component.
-
construct
@Deprecated public <T> T construct(Class<T> componentType)
Deprecated.Since 9.4, please overrideComponentFactory.construct(String)
instead.Constructs a component.- Parameters:
componentType
- type of component- Returns:
- a component
-
-