- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
DependencyInterceptor
is a FunctionalInterface
used to
hook into the process of creating instances from a Dependency
declaration: The instance being created can be decorated or enriched with
functionality providing means to implement a proxy mechanism or a decorator.
A DependencyInterceptor
is registered with a Reactor
.-
Method Summary
Modifier and TypeMethodDescriptionintercept
(Object aInstance, Dependency<?> aDependency) Called by theReactor
for all registeredDependencyInterceptor
instances upon invoking theReactor.createContext()
(or the like) methods (this is the moment when theReactor
created theDependency
declarations' types).
-
Method Details
-
intercept
Called by theReactor
for all registeredDependencyInterceptor
instances upon invoking theReactor.createContext()
(or the like) methods (this is the moment when theReactor
created theDependency
declarations' types). Any instance being created is passed through this method.- Parameters:
aInstance
- The instance created by theDependency
declaration.aDependency
- TheDependency
declaration used for crating instances.- Returns:
- The dependency as of this
intercept(Object, Dependency)
method's processing.
-