public interface ContextManager<T>
Concrete implementations can be registered by providing an implementation class with a default constructor,
along with a class declaration in a service file called:
"/META-INF/services/nl.talsmasoftware.context.ContextManager"
That will take care of any active context being captured in ContextSnapshot instances
managed by the ContextManagers utility class.
| Modifier and Type | Method and Description |
|---|---|
Context<T> |
getActiveContext()
This method returns the current context, or
null if no context is currently active. |
Context<T> |
initializeNewContext(T value)
This method initializes a new context containing the specified
value. |
Context<T> initializeNewContext(T value)
value.
Whether the value is allowed to be null is up to the implementation.
value - The value to initialize a new context for
(which should be closed by the caller at the end of its lifecycle).Copyright © 2016–2017 Talsma ICT. All rights reserved.