Class J7mContext
java.lang.Object
org.j7m.middleware.application.api.J7mContext
Accessor for the current application invocation context.
The implementation uses a private ThreadLocal. Runtime and
deployer code must use the returned J7mContext.Scope with try-with-resources so
context is cleared after dispatch. Access outside a managed invocation
returns an empty safe context.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationContextReturns the current invocation context or an empty safe context.static J7mContext.Scopeopen(InvocationContext context) Installs a context until the returned scope is closed.
-
Method Details
-
currentInvocation
Returns the current invocation context or an empty safe context.- Returns:
- current context
-
open
Installs a context until the returned scope is closed.- Parameters:
context- context to install- Returns:
- closeable scope
-