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, wait
runAs, runAs, runAsConsumer, runAsConsumerEx, runAsFunction, runAsFunctionEx, 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
Copyright © 2017 JBoss by Red Hat. All rights reserved.