Interface DependencyInterceptor
- 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 theReactorfor all registeredDependencyInterceptorinstances upon invoking theReactor.createContext()(or the like) methods (this is the moment when theReactorcreated theDependencydeclarations' types).
-
Method Details
-
intercept
Called by theReactorfor all registeredDependencyInterceptorinstances upon invoking theReactor.createContext()(or the like) methods (this is the moment when theReactorcreated theDependencydeclarations' types). Any instance being created is passed through this method.- Parameters:
aInstance- The instance created by theDependencydeclaration.aDependency- TheDependencydeclaration used for crating instances.- Returns:
- The dependency as of this
intercept(Object, Dependency)method's processing.
-