Class ApplicationReactor
java.lang.Object
org.refcodes.decoupling.Reactor
org.refcodes.decoupling.ext.application.ApplicationReactor
- All Implemented Interfaces:
org.refcodes.properties.ext.application.ApplicationPropertiesAccessor
public class ApplicationReactor
extends org.refcodes.decoupling.Reactor
implements org.refcodes.properties.ext.application.ApplicationPropertiesAccessor
The
ApplicationReactor
enables harnessing the
ApplicationProperties
alongside the ApplicationProperties
profile support (as of ProfileProperties.getRuntimeProfiles()
) by
automatically placing an accordingly configured ApplicationProperties
instance into the container and enabling it for injection. The
ApplicationProperties
Dependency
's alias is set to
"applicationProperties" (as of this class's constant
APPLICATION_PROPERTIES_ALIAS
). Also if declared by a
Dependency
, an ApplicationBus
singleton is provided for
asynchronous communication between the components.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
TheApplicationReactor.ProfilesMode
determines how to handle implicit profiles information as provided by theApplicationProperties
instance (implicitly added asDependency
by theApplicationReactor
).Nested classes/interfaces inherited from interface org.refcodes.properties.ext.application.ApplicationPropertiesAccessor
org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesBuilder<B extends org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesBuilder<B>>, org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesMutator, org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesProperty
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.refcodes.properties.ext.application.ApplicationProperties
static final String
TheApplicationBus
Dependency
's alias to be used.static final String
TheApplicationContext
Dependency
's alias to be used.static final String
TheApplicationProperties
Dependency
's alias to be used.Fields inherited from class org.refcodes.decoupling.Reactor
_dependencies, _interceptors
-
Constructor Summary
ConstructorDescriptionConstructs aApplicationReactor
instance.ApplicationReactor
(File aFile) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(File aFile, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(InputStream aInputStream) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(InputStream aInputStream, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(String aFilePath) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(String aFilePath, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(URL aUrl) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(URL aUrl, String[] aArgs) Create aApplicationReactor
using the providedApplicationProperties
instance.ApplicationReactor
(org.refcodes.properties.ext.application.ApplicationProperties aProperties) Constructs aApplicationReactor
instance. -
Method Summary
Modifier and TypeMethodDescription<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType, Object aNamespace) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType, Object... aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType, String aNamespace) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType, String... aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).<T> org.refcodes.decoupling.DependencyBuilder<T>
addConfiguration
(Class<T> aType, Collection<?> aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
).Uses the profiles as provided by theProperties
initialized with as of the according constructors.createContext
(Object... aProfiles) createContext
(String... aProfiles) createContext
(ApplicationReactor.ProfilesMode aProfilesMode) Creates theApplicationContext
and invokes theInitializable.initialize()
methods before invoking theStartable.start()
methods on all dependencies' instances.org.refcodes.properties.ext.application.ApplicationProperties
Retrieves the initial properties (configuration) represented by thisApplicationProperties
instance.protected ApplicationContext
Methods inherited from class org.refcodes.decoupling.Reactor
addDependency, addDependency, addDependency, addDependency, addDependency, addInterceptor, hasInterceptor, intercept, removeInterceptor
-
Field Details
-
APPLICATION_CONTEXT_ALIAS
TheApplicationContext
Dependency
's alias to be used.- See Also:
-
APPLICATION_PROPERTIES_ALIAS
TheApplicationProperties
Dependency
's alias to be used.- See Also:
-
APPLICATION_BUS_ALIAS
TheApplicationBus
Dependency
's alias to be used.- See Also:
-
_properties
protected org.refcodes.properties.ext.application.ApplicationProperties _properties
-
-
Constructor Details
-
ApplicationReactor
public ApplicationReactor()Constructs aApplicationReactor
instance. -
ApplicationReactor
public ApplicationReactor(org.refcodes.properties.ext.application.ApplicationProperties aProperties) Constructs aApplicationReactor
instance.- Parameters:
aProperties
- TheApplicationProperties
to use as initial configuration.
-
ApplicationReactor
Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aInputStream
- TheInputStream
pointing to the properties to be loaded.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(InputStream aInputStream, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aInputStream
- TheInputStream
pointing to the properties to be loaded.aArgs
- The command line arguments to be evaluated.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
ApplicationReactor
Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aUrl
- TheURL
pointing to the properties to be loaded.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(URL aUrl, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aUrl
- TheURL
pointing to the properties to be loaded.aArgs
- The command line arguments to be evaluated.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
ApplicationReactor
Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFile
- TheFile
pointing to the properties to be loaded.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(File aFile, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFile
- TheFile
pointing to the properties to be loaded.aArgs
- The command line arguments to be evaluated.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
ApplicationReactor
public ApplicationReactor(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFile
- TheFile
pointing to the properties to be loaded.aConfigLocator
- TheConfigLocator
to be used when seeking for the givenFile
.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFile
- TheFile
pointing to the properties to be loaded.aConfigLocator
- TheConfigLocator
to be used when seeking for the givenFile
.aArgs
- the args- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
ApplicationReactor
Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFilePath
- The properties' file path pointing to the properties to be loaded.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(String aFilePath, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFilePath
- The properties' file path pointing to the properties to be loaded.aArgs
- The command line arguments to be evaluated.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
ApplicationReactor
public ApplicationReactor(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFilePath
- The properties' file path pointing to the properties to be loaded.aConfigLocator
- TheConfigLocator
to be used when seeking for the givenString
.- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
ApplicationReactor
public ApplicationReactor(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, String[] aArgs) throws IOException, ParseException, org.refcodes.cli.ArgsSyntaxException Create aApplicationReactor
using the providedApplicationProperties
instance.- Parameters:
aFilePath
- The properties' file path pointing to the properties to be loaded.aConfigLocator
- TheConfigLocator
to be used when seeking for the givenString
.aArgs
- the args- Throws:
IOException
- thrown in case accessing or processing the properties file failed.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.org.refcodes.cli.ArgsSyntaxException
- thrown in case of a command line arguments mismatch regarding provided and expected args.
-
-
Method Details
-
addConfiguration
Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( aType ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
addConfiguration
public <T> org.refcodes.decoupling.DependencyBuilder<T> addConfiguration(Class<T> aType, String aNamespace) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( "service.datasource", aType ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.aNamespace
- The namespace within theProperties
managed by theApplicationReactor
. The namespace can be regarded a property key's prefix.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
addConfiguration
public <T> org.refcodes.decoupling.DependencyBuilder<T> addConfiguration(Class<T> aType, Object aNamespace) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( "service.datasource", aType ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.aNamespace
- The namespace within theProperties
managed by theApplicationReactor
. The namespace can be regarded a property key's prefix.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
addConfiguration
public <T> org.refcodes.decoupling.DependencyBuilder<T> addConfiguration(Class<T> aType, String... aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( aType. "service", "datasource" ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.aNamespaceElements
- The namespace elements denoting the namespace (not requiring denoting any delimiters separating the namespace elements from each other) within theProperties
managed by theApplicationReactor
. The namespace can be regarded a property key's prefix.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
addConfiguration
public <T> org.refcodes.decoupling.DependencyBuilder<T> addConfiguration(Class<T> aType, Object... aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( aType. "service", "datasource" ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.aNamespaceElements
- The namespace elements denoting the namespace (not requiring denoting any delimiters separating the namespace elements from each other) within theProperties
managed by theApplicationReactor
. The namespace can be regarded a property key's prefix.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
addConfiguration
public <T> org.refcodes.decoupling.DependencyBuilder<T> addConfiguration(Class<T> aType, Collection<?> aNamespaceElements) Adds a specially fabricatedDependency
to theReactor
which'sDependencyBuilder
is returned for fluently configuring yourDependency
: TheDependency
will be initialized by default by theApplicationReactor
instance's underlyingProperties
instance (being instantiated by theApplicationReactor
). This is a shortcut for configuring and applying aFactoryClaim
with the accordingProperties
to yourDependency
:addDependency( aType ).withFactory( Properties.class, ( p ) -> p.toType( aType. someNameSpaceList ), "applicationProperties" );
- Type Parameters:
T
- The type of theDependency
.- Parameters:
aType
- The type of theDependency
.aNamespaceElements
- The namespace elements denoting the namespace (not requiring denoting any delimiters separating the namespace elements from each other) within theProperties
managed by theApplicationReactor
. The namespace can be regarded a property key's prefix.- Returns:
- An instance of the
DependencyBuilder
class which is used to fluently configure yourDependency
.
-
createContext
public ApplicationContext createContext() throws org.refcodes.decoupling.AmbigousDependencyException, org.refcodes.decoupling.UnsatisfiedDependencyException, org.refcodes.decoupling.CircularDependencyException, org.refcodes.decoupling.DuplicateDependencyException, org.refcodes.decoupling.DuplicateClaimException, org.refcodes.decoupling.UnsatisfiedClaimException, org.refcodes.decoupling.AmbigousClaimException, org.refcodes.decoupling.AmbigousInitializerException, org.refcodes.decoupling.UnsatisfiedInitializerException, org.refcodes.decoupling.AmbigousFactoryException, org.refcodes.decoupling.UnsatisfiedFactoryException, org.refcodes.decoupling.InstallDependencyExceptionUses the profiles as provided by theProperties
initialized with as of the according constructors.- Overrides:
createContext
in classorg.refcodes.decoupling.Reactor
- Throws:
org.refcodes.decoupling.AmbigousDependencyException
org.refcodes.decoupling.UnsatisfiedDependencyException
org.refcodes.decoupling.CircularDependencyException
org.refcodes.decoupling.DuplicateDependencyException
org.refcodes.decoupling.DuplicateClaimException
org.refcodes.decoupling.UnsatisfiedClaimException
org.refcodes.decoupling.AmbigousClaimException
org.refcodes.decoupling.AmbigousInitializerException
org.refcodes.decoupling.UnsatisfiedInitializerException
org.refcodes.decoupling.AmbigousFactoryException
org.refcodes.decoupling.UnsatisfiedFactoryException
org.refcodes.decoupling.InstallDependencyException
-
createContext
public ApplicationContext createContext(String... aProfiles) throws org.refcodes.decoupling.AmbigousDependencyException, org.refcodes.decoupling.UnsatisfiedDependencyException, org.refcodes.decoupling.CircularDependencyException, org.refcodes.decoupling.DuplicateDependencyException, org.refcodes.decoupling.DuplicateClaimException, org.refcodes.decoupling.UnsatisfiedClaimException, org.refcodes.decoupling.AmbigousClaimException, org.refcodes.decoupling.AmbigousInitializerException, org.refcodes.decoupling.UnsatisfiedInitializerException, org.refcodes.decoupling.AmbigousFactoryException, org.refcodes.decoupling.UnsatisfiedFactoryException, org.refcodes.decoupling.InstallDependencyException - Overrides:
createContext
in classorg.refcodes.decoupling.Reactor
- Throws:
org.refcodes.decoupling.AmbigousDependencyException
org.refcodes.decoupling.UnsatisfiedDependencyException
org.refcodes.decoupling.CircularDependencyException
org.refcodes.decoupling.DuplicateDependencyException
org.refcodes.decoupling.DuplicateClaimException
org.refcodes.decoupling.UnsatisfiedClaimException
org.refcodes.decoupling.AmbigousClaimException
org.refcodes.decoupling.AmbigousInitializerException
org.refcodes.decoupling.UnsatisfiedInitializerException
org.refcodes.decoupling.AmbigousFactoryException
org.refcodes.decoupling.UnsatisfiedFactoryException
org.refcodes.decoupling.InstallDependencyException
-
createContext
public ApplicationContext createContext(ApplicationReactor.ProfilesMode aProfilesMode) throws org.refcodes.decoupling.AmbigousDependencyException, org.refcodes.decoupling.UnsatisfiedDependencyException, org.refcodes.decoupling.CircularDependencyException, org.refcodes.decoupling.DuplicateDependencyException, org.refcodes.decoupling.DuplicateClaimException, org.refcodes.decoupling.UnsatisfiedClaimException, org.refcodes.decoupling.AmbigousClaimException, org.refcodes.decoupling.AmbigousInitializerException, org.refcodes.decoupling.UnsatisfiedInitializerException, org.refcodes.decoupling.AmbigousFactoryException, org.refcodes.decoupling.UnsatisfiedFactoryException, org.refcodes.decoupling.InstallDependencyException Creates theApplicationContext
and invokes theInitializable.initialize()
methods before invoking theStartable.start()
methods on all dependencies' instances. TheApplicationContext
returned then is in lifecycle statusApplicationContext.isRunning()
.- Parameters:
aProfilesMode
- theApplicationReactor.ProfilesMode
determining on how to handle implicit profiles information as provided by theApplicationProperties
instance (implicitly added asDependency
by theApplicationReactor
).- Returns:
- The accordingly created
ApplicationContext
instance. - Throws:
org.refcodes.decoupling.AmbigousDependencyException
- is thrown in case for a requiredDependency
there are more than one matchingDependency
candidates in theReactor
.org.refcodes.decoupling.UnsatisfiedDependencyException
- is thrown in case for a requiredDependency
none matchingDependency
candidates in theReactor
have been found (taking the profiles applied into account) for the constructors of the givenDependency
.org.refcodes.decoupling.CircularDependencyException
- is thrown in case there is some (transitive) circular dependency between twoDependency
instances.org.refcodes.decoupling.DuplicateDependencyException
- is thrown in case there are multiple identical dependencies applicable by theReactor
.org.refcodes.decoupling.DuplicateClaimException
- is thrown in case there are multiple identical claims declared by aDependency
.org.refcodes.decoupling.UnsatisfiedClaimException
- is thrown in case aClaim
instance cannot be satisfied by any knownDependency
instance.org.refcodes.decoupling.AmbigousClaimException
- is thrown in case oneClaim
can be matched by multiple dependencies.org.refcodes.decoupling.AmbigousInitializerException
- is thrown in case oneInitializerClaim
instance can be matched by multiple dependencies.org.refcodes.decoupling.UnsatisfiedInitializerException
- is thrown in case aInitializerClaim
instance cannot be satisfied by any knownDependency
instance.org.refcodes.decoupling.AmbigousFactoryException
- is thrown in case oneFactoryClaim
instance can be matched by multiple dependencies.org.refcodes.decoupling.UnsatisfiedFactoryException
- is thrown in case aFactoryClaim
instance cannot be satisfied by any knownDependency
instance.org.refcodes.decoupling.InstallDependencyException
- is thrown when trying to install aDependency
into theContext
, though installing failed die to the dependency throwing an exception during the process of installing (e.g. instantiation).
-
createContext
public ApplicationContext createContext(Object... aProfiles) throws org.refcodes.decoupling.AmbigousDependencyException, org.refcodes.decoupling.UnsatisfiedDependencyException, org.refcodes.decoupling.CircularDependencyException, org.refcodes.decoupling.DuplicateDependencyException, org.refcodes.decoupling.DuplicateClaimException, org.refcodes.decoupling.UnsatisfiedClaimException, org.refcodes.decoupling.AmbigousClaimException, org.refcodes.decoupling.AmbigousInitializerException, org.refcodes.decoupling.UnsatisfiedInitializerException, org.refcodes.decoupling.AmbigousFactoryException, org.refcodes.decoupling.UnsatisfiedFactoryException, org.refcodes.decoupling.InstallDependencyException - Overrides:
createContext
in classorg.refcodes.decoupling.Reactor
- Throws:
org.refcodes.decoupling.AmbigousDependencyException
org.refcodes.decoupling.UnsatisfiedDependencyException
org.refcodes.decoupling.CircularDependencyException
org.refcodes.decoupling.DuplicateDependencyException
org.refcodes.decoupling.DuplicateClaimException
org.refcodes.decoupling.UnsatisfiedClaimException
org.refcodes.decoupling.AmbigousClaimException
org.refcodes.decoupling.AmbigousInitializerException
org.refcodes.decoupling.UnsatisfiedInitializerException
org.refcodes.decoupling.AmbigousFactoryException
org.refcodes.decoupling.UnsatisfiedFactoryException
org.refcodes.decoupling.InstallDependencyException
-
getApplicationProperties
public org.refcodes.properties.ext.application.ApplicationProperties getApplicationProperties()Retrieves the initial properties (configuration) represented by thisApplicationProperties
instance.- Specified by:
getApplicationProperties
in interfaceorg.refcodes.properties.ext.application.ApplicationPropertiesAccessor
- Returns:
- The according initial configuration.
-
toContext
- Overrides:
toContext
in classorg.refcodes.decoupling.Reactor
-