Class SecurityContexts
java.lang.Object
org.j7m.middleware.security.api.SecurityContexts
Thread-local security context holder used by runtime and proxy code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tcall(SecurityContext context, Callable<T> body) Runs a body with a security context.static SecurityContextcurrent()Returns the current security context.static voidrun(SecurityContext context, Runnable body) Runs a body with a security context.
-
Method Details
-
current
Returns the current security context.- Returns:
- context or
null
-
call
Runs a body with a security context.- Type Parameters:
T- return type- Parameters:
context- context to installbody- body to execute- Returns:
- body result
-
run
Runs a body with a security context.- Parameters:
context- context to installbody- body to execute
-