public final class FlexibleIdentityAssociation extends Object implements Scoped, Supplier<SecurityIdentity>
SecurityIdentity.createFlexibleAssociation()| Modifier and Type | Method and Description |
|---|---|
SecurityIdentity |
get()
Get the current associated identity.
|
<T,U> void |
runAsConsumer(BiConsumer<T,U> action,
T parameter1,
U parameter2)
Run an action under this identity.
|
<T,U,E extends Exception> |
runAsConsumerEx(org.wildfly.common.function.ExceptionBiConsumer<T,U,E> action,
T parameter1,
U parameter2)
Run an action under this identity.
|
<T,U,R> R |
runAsFunction(BiFunction<T,U,R> action,
T parameter1,
U parameter2)
Run an action under this identity.
|
<T,U,R,E extends Exception> |
runAsFunctionEx(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> action,
T parameter1,
U parameter2)
Run an action under this identity.
|
<T> void |
runAsObjIntConsumer(ObjIntConsumer<T> action,
T parameter1,
int parameter2)
Run an action under this identity.
|
<T,E extends Exception> |
runAsObjIntConsumerEx(org.wildfly.common.function.ExceptionObjIntConsumer<T,E> action,
T parameter1,
int parameter2)
Run an action under this identity.
|
void |
setIdentity(SecurityIdentity securityIdentity)
Set the current associated identity.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunAs, runAs, runAsConsumer, runAsConsumerEx, runAsFunction, runAsFunctionEx, runAsSupplier, runAsSupplierExpublic void setIdentity(SecurityIdentity securityIdentity)
securityIdentity - the current associated identity (must not be null)public SecurityIdentity get()
get in interface Supplier<SecurityIdentity>null)public <T,U,R> R runAsFunction(BiFunction<T,U,R> action, T parameter1, U parameter2)
ScopedrunAsFunction in interface ScopedT - the action first parameter typeU - the action second parameter typeR - the action return typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionnull)public <T,U> void runAsConsumer(BiConsumer<T,U> action, T parameter1, U parameter2)
ScopedrunAsConsumer in interface ScopedT - the action first parameter typeU - the action second parameter typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionpublic <T> void runAsObjIntConsumer(ObjIntConsumer<T> action, T parameter1, int parameter2)
ScopedrunAsObjIntConsumer in interface ScopedT - the action first parameter typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionpublic <T,U,R,E extends Exception> R runAsFunctionEx(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> action, T parameter1, U parameter2) throws E extends Exception
ScopedrunAsFunctionEx in interface ScopedT - the action first parameter typeU - the action second parameter typeR - the action return typeE - the action exception typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionnull)E - if the action throws this exceptionE extends Exceptionpublic <T,U,E extends Exception> void runAsConsumerEx(org.wildfly.common.function.ExceptionBiConsumer<T,U,E> action, T parameter1, U parameter2) throws E extends Exception
ScopedrunAsConsumerEx in interface ScopedT - the action first parameter typeU - the action second parameter typeE - the action exception typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionE - if the action throws this exceptionE extends Exceptionpublic <T,E extends Exception> void runAsObjIntConsumerEx(org.wildfly.common.function.ExceptionObjIntConsumer<T,E> action, T parameter1, int parameter2) throws E extends Exception
ScopedrunAsObjIntConsumerEx in interface ScopedT - the action first parameter typeE - the action exception typeaction - the action to runparameter1 - the first parameter to pass to the actionparameter2 - the second parameter to pass to the actionE - if the action throws this exceptionE extends ExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.