Interface ConfigurableComponentFactory
-
- All Known Subinterfaces:
AzkarraContext
- All Known Implementing Classes:
AutoCreateTopicsInterceptor
,BaseComponentModule
,ComplexWordCountTopologyModule
,ComponentModule
,ConditionalStreamsApplication.NormalizeStreamsTopology
,DefaultAzkarraContext
,MeterKafkaStreamsInterceptor
,MeterRegistryFactory
public interface ConfigurableComponentFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> Collection<T>
getAllComponents(Class<T> type)
Gets all instances, which may be shared or independent, for the specified type.default <T> Collection<T>
getAllComponents(Class<T> type, Qualifier<T> qualifier)
Gets all instances, which may be shared or independent, for the specified type.default <T> Collection<T>
getAllComponents(String alias)
Gets all instances, which may be shared or independent, for the specified type.default <T> Collection<T>
getAllComponents(String alias, Qualifier<T> qualifier)
Gets all instances, which may be shared or independent, for the specified type.default <T> T
getComponent(Class<T> type)
Gets an instance, which may be shared or independent, for the specified type.default <T> T
getComponent(Class<T> type, Qualifier<T> qualifier)
Gets an instance, which may be shared or independent, for the specified type.default <T> T
getComponent(String alias)
Gets an instance, which may be shared or independent, for the specified type.default <T> T
getComponent(String alias, Qualifier<T> qualifier)
Gets an instance, which may be shared or independent, for the specified type.ComponentFactory
getComponentFactory()
Gets the internalComponentFactory
.Conf
getConfiguration()
Gets the configuration used by this component factory.
-
-
-
Method Detail
-
getComponentFactory
ComponentFactory getComponentFactory()
Gets the internalComponentFactory
.- Returns:
- the
ComponentFactory
instance to be used.
-
getConfiguration
Conf getConfiguration()
Gets the configuration used by this component factory.- Returns:
- the
Conf
-
getComponent
default <T> T getComponent(Class<T> type)
Gets an instance, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
type
- the component class.- Returns:
- the instance of type
ConfigurableComponentFactory
. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.NoSuchComponentException
- if no component is registered for the given type.
-
getComponent
default <T> T getComponent(Class<T> type, Qualifier<T> qualifier)
Gets an instance, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
type
- the component class.qualifier
- the options used to qualify the component.- Returns:
- the instance of type
ConfigurableComponentFactory
. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.NoSuchComponentException
- if no component is registered for the given type.
-
getComponent
default <T> T getComponent(String alias)
Gets an instance, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
alias
- the fully qualified class name or an alias of the component.- Returns:
- the instance of type
ConfigurableComponentFactory
. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.NoSuchComponentException
- if no component is registered for the given class or alias..
-
getComponent
default <T> T getComponent(String alias, Qualifier<T> qualifier)
Gets an instance, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
alias
- the fully qualified class name or an alias of the component.qualifier
- the options used to qualify the component.- Returns:
- the instance of type
ConfigurableComponentFactory
. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.NoSuchComponentException
- if no component is registered for the given class or alias..
-
getAllComponents
default <T> Collection<T> getAllComponents(String alias)
Gets all instances, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
alias
- the fully qualified class name or an alias of the component.- Returns:
- all instances of type
ConfigurableComponentFactory
.
-
getAllComponents
default <T> Collection<T> getAllComponents(String alias, Qualifier<T> qualifier)
Gets all instances, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
alias
- the fully qualified class name or an alias of the component.qualifier
- the options used to qualify the component.- Returns:
- all instances of type
ConfigurableComponentFactory
.
-
getAllComponents
default <T> Collection<T> getAllComponents(Class<T> type)
Gets all instances, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
type
- the component class.- Returns:
- all instances of type
ConfigurableComponentFactory
.
-
getAllComponents
default <T> Collection<T> getAllComponents(Class<T> type, Qualifier<T> qualifier)
Gets all instances, which may be shared or independent, for the specified type.- Type Parameters:
T
- the component-type.- Parameters:
type
- the component class.qualifier
- the options used to qualify the component.- Returns:
- all instances of type
ConfigurableComponentFactory
.
-
-