java.lang.Object
io.inverno.mod.base.Scope<T>
- Type Parameters:
T
- the type of the scoped instances
- Direct Known Subclasses:
KeyScope
,ReactorScope
,ThreadScope
A scope can be used to define a bean which allows to create and retrieve different bean instances depending on a particular scope.
It is then possible to create instances using DI for a particular context. This context can be anything from the current thread or specified by an arbitrary key.
A typical Scope
implementation typically relies on prototype
beans injected lazily to benefit from dependency injection but they can also
be designed as a regular factories.
- Since:
- 1.2
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Scope
public Scope()
-
-
Method Details
-
create
Creates a scoped instance.
- Returns:
- an instance
-