Package org.axonframework.messaging.core
Class ConfigurationApplicationContext
java.lang.Object
org.axonframework.messaging.core.ConfigurationApplicationContext
- All Implemented Interfaces:
ApplicationContext
An
ApplicationContext implementation that retrieves components from a given Configuration.- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationApplicationContext(Configuration configuration) Creates a newConfigurationApplicationContextthat retrieves components from the givenconfiguration. -
Method Summary
Modifier and TypeMethodDescription<C> CReturns the component declared under the giventypeor throws aComponentNotFoundExceptionif it does not exist.<C> CReturns the component declared under the giventypeandnameor throws aComponentNotFoundExceptionif it does not exist.
-
Constructor Details
-
ConfigurationApplicationContext
Creates a newConfigurationApplicationContextthat retrieves components from the givenconfiguration.- Parameters:
configuration- The configuration to retrieve components from.
-
-
Method Details
-
component
Description copied from interface:ApplicationContextReturns the component declared under the giventypeandnameor throws aComponentNotFoundExceptionif it does not exist.- Specified by:
componentin interfaceApplicationContext- Type Parameters:
C- The type of component.- Parameters:
type- The type of component, typically the interface the component implements.name- The name of the component to retrieve. Usenullwhen there is no name or useApplicationContext.component(Class)instead.- Returns:
- The component registered for the given
typeandname.
-
component
Description copied from interface:ApplicationContextReturns the component declared under the giventypeor throws aComponentNotFoundExceptionif it does not exist.- Specified by:
componentin interfaceApplicationContext- Type Parameters:
C- The type of component.- Parameters:
type- The type of component, typically the interface the component implements.- Returns:
- The component registered for the given type.
-