|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.security.concurrent.DelegatingSecurityContextRunnable
public final class DelegatingSecurityContextRunnable
Wraps a delegate Runnable with logic for setting up a SecurityContext before invoking the delegate
Runnable and then removing the SecurityContext after the delegate has completed.
| Constructor Summary | |
|---|---|
DelegatingSecurityContextRunnable(Runnable delegate)
Creates a new DelegatingSecurityContextRunnable with the SecurityContext from the
SecurityContextHolder. |
|
DelegatingSecurityContextRunnable(Runnable delegate,
SecurityContext securityContext)
Creates a new DelegatingSecurityContextRunnable with a specific SecurityContext. |
|
| Method Summary | |
|---|---|
static Runnable |
create(Runnable delegate,
SecurityContext securityContext)
Factory method for creating a DelegatingSecurityContextRunnable. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatingSecurityContextRunnable(Runnable delegate,
SecurityContext securityContext)
DelegatingSecurityContextRunnable with a specific SecurityContext.
delegate - the delegate Runnable to run with the specified SecurityContext. Cannot be null.securityContext - the SecurityContext to establish for the delegate Runnable. Cannot be
null.public DelegatingSecurityContextRunnable(Runnable delegate)
DelegatingSecurityContextRunnable with the SecurityContext from the
SecurityContextHolder.
delegate - the delegate Runnable to run under the current SecurityContext. Cannot be null.| Method Detail |
|---|
public void run()
run in interface Runnable
public static Runnable create(Runnable delegate,
SecurityContext securityContext)
DelegatingSecurityContextRunnable.
delegate - the original Runnable that will be delegated to after establishing a
SecurityContext on the SecurityContextHolder. Cannot have null.securityContext - the SecurityContext to establish before invoking the delegate Runnable. If
null, the current SecurityContext from the SecurityContextHolder will be used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||