Package org.wildfly.security.auth.server
Interface Scoped
- All Known Implementing Classes:
FlexibleIdentityAssociation,SecurityIdentity
public interface Scoped
An identity configuration which can be applied on a scoped basis.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidRun an action under this identity.default <T> TRun an action under this identity.default <R> RrunAsAction(PrivilegedAction<R> action) Run an action under this identity.default <T,U> boolean runAsBiPredicate(BiPredicate<T, U> predicate, 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.default <T> voidrunAsConsumer(Consumer<T> action, T parameter) Run an action under this identity.<T,U, E extends Exception>
voidrunAsConsumerEx(org.wildfly.common.function.ExceptionBiConsumer<T, U, E> action, T parameter1, U parameter2) Run an action under this identity.default <T,E extends Exception>
voidrunAsConsumerEx(org.wildfly.common.function.ExceptionConsumer<T, E> action, T parameter) Run an action under this identity.default <T,U, E extends Exception>
booleanrunAsExBiPredicate(org.wildfly.common.function.ExceptionBiPredicate<T, U, E> predicate, T param1, U param2) Run an action under this identity.default <R> RrunAsExceptionAction(PrivilegedExceptionAction<R> action) Run an action under this identity.default <T,E extends Exception>
TrunAsExIntFunction(org.wildfly.common.function.ExceptionIntFunction<T, E> action, int value) Run an action under this identity.default <T,E extends Exception>
TrunAsExLongFunction(org.wildfly.common.function.ExceptionLongFunction<T, E> action, long value) Run an action under this identity.default <T,E extends Exception>
booleanrunAsExPredicate(org.wildfly.common.function.ExceptionPredicate<T, E> predicate, T param) 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.default <T,R> R runAsFunction(Function<T, R> action, T parameter) Run an action under this identity.<T,U, R, E extends Exception>
RrunAsFunctionEx(org.wildfly.common.function.ExceptionBiFunction<T, U, R, E> action, T parameter1, U parameter2) Run an action under this identity.default <T,R, E extends Exception>
RrunAsFunctionEx(org.wildfly.common.function.ExceptionFunction<T, R, E> action, T parameter) Run an action under this identity.default <T> TrunAsIntFunction(IntFunction<T> action, int value) Run an action under this identity.default <T> TrunAsLongFunction(LongFunction<T> action, long value) Run an action under this identity.<T> voidrunAsObjIntConsumer(ObjIntConsumer<T> action, T parameter1, int parameter2) Run an action under this identity.<T,E extends Exception>
voidrunAsObjIntConsumerEx(org.wildfly.common.function.ExceptionObjIntConsumer<T, E> action, T parameter1, int parameter2) Run an action under this identity.default <T> booleanrunAsPredicate(Predicate<T> predicate, T param) Run an action under this identity.default <T> TrunAsSupplier(Supplier<T> action) Run an action under this identity.default <T,E extends Exception>
TrunAsSupplierEx(org.wildfly.common.function.ExceptionSupplier<T, E> action) Run an action under this identity.
-
Method Details
-
runAs
Run an action under this identity.- Parameters:
action- the action to run
-
runAs
Run an action under this identity.- Type Parameters:
T- the action return type- Parameters:
action- the action to run- Returns:
- the action result (may be
null) - Throws:
Exception- if the action fails
-
runAsFunction
Run an action under this identity.- Type Parameters:
R- the action return typeT- the action parameter type- Parameters:
parameter- the parameter to pass to the actionaction- the action to run- Returns:
- the action result (may be
null)
-
runAsFunction
Run an action under this identity.- Type Parameters:
R- the action return typeT- the action first parameter typeU- the action second parameter type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run- Returns:
- the action result (may be
null)
-
runAsConsumer
Run an action under this identity.- Type Parameters:
T- the action parameter type- Parameters:
parameter- the parameter to pass to the actionaction- the action to run
-
runAsConsumer
Run an action under this identity.- Type Parameters:
T- the action first parameter typeU- the action second parameter type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run
-
runAsObjIntConsumer
Run an action under this identity.- Type Parameters:
T- the action first parameter type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run
-
runAsSupplier
Run an action under this identity.- Type Parameters:
T- the action return type- Parameters:
action- the action to run- Returns:
- the action result (may be
null)
-
runAsFunctionEx
default <T,R, R runAsFunctionExE extends Exception> (org.wildfly.common.function.ExceptionFunction<T, R, throws EE> action, T parameter) Run an action under this identity.- Type Parameters:
R- the action return typeT- the action parameter typeE- the action exception type- Parameters:
parameter- the parameter to pass to the actionaction- the action to run- Returns:
- the action result (may be
null) - Throws:
E- if the action throws this exception
-
runAsFunctionEx
<T,U, R runAsFunctionExR, E extends Exception> (org.wildfly.common.function.ExceptionBiFunction<T, U, throws ER, E> action, T parameter1, U parameter2) Run an action under this identity.- Type Parameters:
R- the action return typeT- the action first parameter typeU- the action second parameter typeE- the action exception type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run- Returns:
- the action result (may be
null) - Throws:
E- if the action throws this exception
-
runAsConsumerEx
default <T,E extends Exception> void runAsConsumerEx(org.wildfly.common.function.ExceptionConsumer<T, E> action, T parameter) throws ERun an action under this identity.- Type Parameters:
T- the action parameter typeE- the action exception type- Parameters:
parameter- the parameter to pass to the actionaction- the action to run- Throws:
E- if the action throws this exception
-
runAsConsumerEx
<T,U, void runAsConsumerExE extends Exception> (org.wildfly.common.function.ExceptionBiConsumer<T, U, throws EE> action, T parameter1, U parameter2) Run an action under this identity.- Type Parameters:
T- the action first parameter typeU- the action second parameter typeE- the action exception type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run- Throws:
E- if the action throws this exception
-
runAsObjIntConsumerEx
<T,E extends Exception> void runAsObjIntConsumerEx(org.wildfly.common.function.ExceptionObjIntConsumer<T, E> action, T parameter1, int parameter2) throws ERun an action under this identity.- Type Parameters:
T- the action first parameter typeE- the action exception type- Parameters:
parameter1- the first parameter to pass to the actionparameter2- the second parameter to pass to the actionaction- the action to run- Throws:
E- if the action throws this exception
-
runAsSupplierEx
default <T,E extends Exception> T runAsSupplierEx(org.wildfly.common.function.ExceptionSupplier<T, E> action) throws ERun an action under this identity.- Type Parameters:
T- the action return typeE- the action exception type- Parameters:
action- the action to run- Returns:
- the action result (may be
null) - Throws:
E- if the action throws this exception
-
runAsAction
Run an action under this identity.- Type Parameters:
R- the return value type- Parameters:
action- the task to run (must not benull)- Returns:
- the action return value
-
runAsExceptionAction
default <R> R runAsExceptionAction(PrivilegedExceptionAction<R> action) throws PrivilegedActionException Run an action under this identity.- Type Parameters:
R- the return value type- Parameters:
action- the task to run (must not benull)- Returns:
- the action return value
- Throws:
PrivilegedActionException- if the action fails with an exception
-
runAsBiPredicate
Run an action under this identity.- Type Parameters:
T- the first parameter typeU- the second parameter type- Parameters:
predicate- the task to run (must not benull)param1- the first parameter to pass to the taskparam2- the second parameter to pass to the task- Returns:
- the action return value
- Throws:
UnsupportedOperationException- if this operation is not implemented
-
runAsExBiPredicate
default <T,U, boolean runAsExBiPredicateE extends Exception> (org.wildfly.common.function.ExceptionBiPredicate<T, U, throws EE> predicate, T param1, U param2) Run an action under this identity.- Type Parameters:
T- the first parameter typeU- the second parameter typeE- the exception type- Parameters:
predicate- the task to run (must not benull)param1- the first parameter to pass to the taskparam2- the second parameter to pass to the task- Returns:
- the action return value
- Throws:
E- if an exception occurs in the taskUnsupportedOperationException- if this operation is not implemented
-
runAsPredicate
Run an action under this identity.- Type Parameters:
T- the first parameter type- Parameters:
predicate- the task to run (must not benull)param- the parameter to pass to the task- Returns:
- the action return value
-
runAsExPredicate
default <T,E extends Exception> boolean runAsExPredicate(org.wildfly.common.function.ExceptionPredicate<T, E> predicate, T param) throws ERun an action under this identity.- Type Parameters:
T- the first parameter typeE- the exception type- Parameters:
predicate- the task to run (must not benull)param- the parameter to pass to the task- Returns:
- the action return value
- Throws:
E- if an exception occurs in the task
-
runAsIntFunction
Run an action under this identity.- Type Parameters:
T- the return value type- Parameters:
action- the task to run (must not benull)value- the parameter to pass to the task- Returns:
- the action return value
-
runAsExIntFunction
default <T,E extends Exception> T runAsExIntFunction(org.wildfly.common.function.ExceptionIntFunction<T, E> action, int value) throws ERun an action under this identity.- Type Parameters:
T- the return value typeE- the exception type- Parameters:
action- the task to run (must not benull)value- the parameter to pass to the task- Returns:
- the action return value
- Throws:
E- if an exception occurs in the task
-
runAsLongFunction
Run an action under this identity.- Type Parameters:
T- the return value type- Parameters:
action- the task to run (must not benull)value- the parameter to pass to the task- Returns:
- the action return value
-
runAsExLongFunction
default <T,E extends Exception> T runAsExLongFunction(org.wildfly.common.function.ExceptionLongFunction<T, E> action, long value) throws ERun an action under this identity.- Type Parameters:
T- the return value typeE- the exception type- Parameters:
action- the task to run (must not benull)value- the parameter to pass to the task- Returns:
- the action return value
- Throws:
E- if an exception occurs in the task
-