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> boolean |
runAsBiPredicate(BiPredicate<T,U> action,
T param1,
U param2)
Run an action under this 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,E extends Exception> |
runAsExBiPredicate(org.wildfly.common.function.ExceptionBiPredicate<T,U,E> action,
T param1,
U param2)
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, wait
runAs, runAs, runAsAction, runAsConsumer, runAsConsumerEx, runAsExceptionAction, runAsExIntFunction, runAsExLongFunction, runAsExPredicate, runAsFunction, runAsFunctionEx, runAsIntFunction, runAsLongFunction, runAsPredicate, runAsSupplier, runAsSupplierEx
public 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)
Scoped
runAsFunction
in interface Scoped
T
- 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)
Scoped
runAsConsumer
in interface Scoped
T
- 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)
Scoped
runAsObjIntConsumer
in interface Scoped
T
- 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
Scoped
runAsFunctionEx
in interface Scoped
T
- 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 Exception
public <T,U,E extends Exception> void runAsConsumerEx(org.wildfly.common.function.ExceptionBiConsumer<T,U,E> action, T parameter1, U parameter2) throws E extends Exception
Scoped
runAsConsumerEx
in interface Scoped
T
- 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 Exception
public <T,E extends Exception> void runAsObjIntConsumerEx(org.wildfly.common.function.ExceptionObjIntConsumer<T,E> action, T parameter1, int parameter2) throws E extends Exception
Scoped
runAsObjIntConsumerEx
in interface Scoped
T
- 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 Exception
public <T,U> boolean runAsBiPredicate(BiPredicate<T,U> action, T param1, U param2)
Scoped
runAsBiPredicate
in interface Scoped
T
- the first parameter typeU
- the second parameter typeaction
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskpublic <T,U,E extends Exception> boolean runAsExBiPredicate(org.wildfly.common.function.ExceptionBiPredicate<T,U,E> action, T param1, U param2) throws E extends Exception
Scoped
runAsExBiPredicate
in interface Scoped
T
- the first parameter typeU
- the second parameter typeE
- the exception typeaction
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskE
- if an exception occurs in the taskE extends Exception
Copyright © 2020 JBoss by Red Hat. All rights reserved.