|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.concurrent.DelegatingSecurityContextCallable<V>
public final class DelegatingSecurityContextCallable<V>
Wraps a delegate Callable
with logic for setting up a SecurityContext
before invoking the delegate
Callable
and then removing the SecurityContext
after the delegate has completed.
Constructor Summary | |
---|---|
DelegatingSecurityContextCallable(Callable<V> delegate)
Creates a new DelegatingSecurityContextCallable with the SecurityContext from the
SecurityContextHolder . |
|
DelegatingSecurityContextCallable(Callable<V> delegate,
SecurityContext securityContext)
Creates a new DelegatingSecurityContextCallable with a specific SecurityContext . |
Method Summary | ||
---|---|---|
V |
call()
|
|
static
|
create(Callable<V> delegate,
SecurityContext securityContext)
Creates a DelegatingSecurityContextCallable and with the given Callable and
SecurityContext , but if the securityContext is null will defaults to the current SecurityContext
on the SecurityContextHolder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingSecurityContextCallable(Callable<V> delegate, SecurityContext securityContext)
DelegatingSecurityContextCallable
with a specific SecurityContext
.
delegate
- the delegate DelegatingSecurityContextCallable
to run with the specified
SecurityContext
. Cannot be null.securityContext
- the SecurityContext
to establish for the delegate Callable
. Cannot be
null.public DelegatingSecurityContextCallable(Callable<V> delegate)
DelegatingSecurityContextCallable
with the SecurityContext
from the
SecurityContextHolder
.
delegate
- the delegate Callable
to run under the current SecurityContext
. Cannot be null.Method Detail |
---|
public V call() throws Exception
call
in interface Callable<V>
Exception
public static <V> Callable<V> create(Callable<V> delegate, SecurityContext securityContext)
DelegatingSecurityContextCallable
and with the given Callable
and
SecurityContext
, but if the securityContext is null will defaults to the current SecurityContext
on the SecurityContextHolder
delegate
- the delegate DelegatingSecurityContextCallable
to run with the specified
SecurityContext
. Cannot be null.securityContext
- the SecurityContext
to establish for the delegate Callable
. If null,
defaults to SecurityContextHolder.getContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |