Interface Scoped

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void runAs​(Runnable action)
      Run an action under this identity.
      default <T> T runAs​(Callable<T> action)
      Run an action under this identity.
      default <R> R runAsAction​(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> void runAsConsumer​(Consumer<T> action, T parameter)
      Run an action under this identity.
      <T,​U,​E extends Exception>
      void
      runAsConsumerEx​(org.wildfly.common.function.ExceptionBiConsumer<T,​U,​E> action, T parameter1, U parameter2)
      Run an action under this identity.
      default <T,​E extends Exception>
      void
      runAsConsumerEx​(org.wildfly.common.function.ExceptionConsumer<T,​E> action, T parameter)
      Run an action under this identity.
      default <T,​U,​E extends Exception>
      boolean
      runAsExBiPredicate​(org.wildfly.common.function.ExceptionBiPredicate<T,​U,​E> predicate, T param1, U param2)
      Run an action under this identity.
      default <R> R runAsExceptionAction​(PrivilegedExceptionAction<R> action)
      Run an action under this identity.
      default <T,​E extends Exception>
      T
      runAsExIntFunction​(org.wildfly.common.function.ExceptionIntFunction<T,​E> action, int value)
      Run an action under this identity.
      default <T,​E extends Exception>
      T
      runAsExLongFunction​(org.wildfly.common.function.ExceptionLongFunction<T,​E> action, long value)
      Run an action under this identity.
      default <T,​E extends Exception>
      boolean
      runAsExPredicate​(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>
      R
      runAsFunctionEx​(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>
      R
      runAsFunctionEx​(org.wildfly.common.function.ExceptionFunction<T,​R,​E> action, T parameter)
      Run an action under this identity.
      default <T> T runAsIntFunction​(IntFunction<T> action, int value)
      Run an action under this identity.
      default <T> T runAsLongFunction​(LongFunction<T> action, long value)
      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>
      void
      runAsObjIntConsumerEx​(org.wildfly.common.function.ExceptionObjIntConsumer<T,​E> action, T parameter1, int parameter2)
      Run an action under this identity.
      default <T> boolean runAsPredicate​(Predicate<T> predicate, T param)
      Run an action under this identity.
      default <T> T runAsSupplier​(Supplier<T> action)
      Run an action under this identity.
      default <T,​E extends Exception>
      T
      runAsSupplierEx​(org.wildfly.common.function.ExceptionSupplier<T,​E> action)
      Run an action under this identity.
    • Method Detail

      • runAs

        default void runAs​(Runnable action)
        Run an action under this identity.
        Parameters:
        action - the action to run
      • runAs

        default <T> T runAs​(Callable<T> action)
                     throws Exception
        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

        default <T,​R> R runAsFunction​(Function<T,​R> action,
                                            T parameter)
        Run an action under this identity.
        Type Parameters:
        R - the action return type
        T - the action parameter type
        Parameters:
        parameter - the parameter to pass to the action
        action - the action to run
        Returns:
        the action result (may be null)
      • runAsFunction

        <T,​U,​R> R runAsFunction​(BiFunction<T,​U,​R> action,
                                            T parameter1,
                                            U parameter2)
        Run an action under this identity.
        Type Parameters:
        R - the action return type
        T - the action first parameter type
        U - the action second parameter type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
        Returns:
        the action result (may be null)
      • runAsConsumer

        default <T> void runAsConsumer​(Consumer<T> action,
                                       T parameter)
        Run an action under this identity.
        Type Parameters:
        T - the action parameter type
        Parameters:
        parameter - the parameter to pass to the action
        action - the action to run
      • runAsConsumer

        <T,​U> void runAsConsumer​(BiConsumer<T,​U> action,
                                       T parameter1,
                                       U parameter2)
        Run an action under this identity.
        Type Parameters:
        T - the action first parameter type
        U - the action second parameter type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
      • runAsObjIntConsumer

        <T> void runAsObjIntConsumer​(ObjIntConsumer<T> action,
                                     T parameter1,
                                     int parameter2)
        Run an action under this identity.
        Type Parameters:
        T - the action first parameter type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
      • runAsSupplier

        default <T> T runAsSupplier​(Supplier<T> action)
        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,​E extends Exception> R runAsFunctionEx​(org.wildfly.common.function.ExceptionFunction<T,​R,​E> action,
                                                                        T parameter)
                                                                 throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        R - the action return type
        T - the action parameter type
        E - the action exception type
        Parameters:
        parameter - the parameter to pass to the action
        action - the action to run
        Returns:
        the action result (may be null)
        Throws:
        E - if the action throws this exception
        E extends Exception
      • runAsFunctionEx

        <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
        Run an action under this identity.
        Type Parameters:
        R - the action return type
        T - the action first parameter type
        U - the action second parameter type
        E - the action exception type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
        Returns:
        the action result (may be null)
        Throws:
        E - if the action throws this exception
        E extends Exception
      • runAsConsumerEx

        default <T,​E extends Exception> void runAsConsumerEx​(org.wildfly.common.function.ExceptionConsumer<T,​E> action,
                                                                   T parameter)
                                                            throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the action parameter type
        E - the action exception type
        Parameters:
        parameter - the parameter to pass to the action
        action - the action to run
        Throws:
        E - if the action throws this exception
        E extends Exception
      • runAsConsumerEx

        <T,​U,​E extends Exception> void runAsConsumerEx​(org.wildfly.common.function.ExceptionBiConsumer<T,​U,​E> action,
                                                                   T parameter1,
                                                                   U parameter2)
                                                            throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the action first parameter type
        U - the action second parameter type
        E - the action exception type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
        Throws:
        E - if the action throws this exception
        E extends Exception
      • runAsObjIntConsumerEx

        <T,​E extends Exception> void runAsObjIntConsumerEx​(org.wildfly.common.function.ExceptionObjIntConsumer<T,​E> action,
                                                                 T parameter1,
                                                                 int parameter2)
                                                          throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the action first parameter type
        E - the action exception type
        Parameters:
        parameter1 - the first parameter to pass to the action
        parameter2 - the second parameter to pass to the action
        action - the action to run
        Throws:
        E - if the action throws this exception
        E extends Exception
      • runAsSupplierEx

        default <T,​E extends Exception> T runAsSupplierEx​(org.wildfly.common.function.ExceptionSupplier<T,​E> action)
                                                         throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the action return type
        E - 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
        E extends Exception
      • runAsAction

        default <R> R runAsAction​(PrivilegedAction<R> action)
        Run an action under this identity.
        Type Parameters:
        R - the return value type
        Parameters:
        action - the task to run (must not be null)
        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 be null)
        Returns:
        the action return value
        Throws:
        PrivilegedActionException - if the action fails with an exception
      • runAsBiPredicate

        default <T,​U> boolean runAsBiPredicate​(BiPredicate<T,​U> predicate,
                                                     T param1,
                                                     U param2)
        Run an action under this identity.
        Type Parameters:
        T - the first parameter type
        U - the second parameter type
        Parameters:
        predicate - the task to run (must not be null)
        param1 - the first parameter to pass to the task
        param2 - 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,​E extends Exception> boolean runAsExBiPredicate​(org.wildfly.common.function.ExceptionBiPredicate<T,​U,​E> predicate,
                                                                                 T param1,
                                                                                 U param2)
                                                                          throws E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the first parameter type
        U - the second parameter type
        E - the exception type
        Parameters:
        predicate - the task to run (must not be null)
        param1 - the first parameter to pass to the task
        param2 - the second parameter to pass to the task
        Returns:
        the action return value
        Throws:
        E - if an exception occurs in the task
        UnsupportedOperationException - if this operation is not implemented
        E extends Exception
      • runAsPredicate

        default <T> boolean runAsPredicate​(Predicate<T> predicate,
                                           T param)
        Run an action under this identity.
        Type Parameters:
        T - the first parameter type
        Parameters:
        predicate - the task to run (must not be null)
        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 E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the first parameter type
        E - the exception type
        Parameters:
        predicate - the task to run (must not be null)
        param - the parameter to pass to the task
        Returns:
        the action return value
        Throws:
        E - if an exception occurs in the task
        E extends Exception
      • runAsIntFunction

        default <T> T runAsIntFunction​(IntFunction<T> action,
                                       int value)
        Run an action under this identity.
        Type Parameters:
        T - the return value type
        Parameters:
        action - the task to run (must not be null)
        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 E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the return value type
        E - the exception type
        Parameters:
        action - the task to run (must not be null)
        value - the parameter to pass to the task
        Returns:
        the action return value
        Throws:
        E - if an exception occurs in the task
        E extends Exception
      • runAsLongFunction

        default <T> T runAsLongFunction​(LongFunction<T> action,
                                        long value)
        Run an action under this identity.
        Type Parameters:
        T - the return value type
        Parameters:
        action - the task to run (must not be null)
        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 E extends Exception
        Run an action under this identity.
        Type Parameters:
        T - the return value type
        E - the exception type
        Parameters:
        action - the task to run (must not be null)
        value - the parameter to pass to the task
        Returns:
        the action return value
        Throws:
        E - if an exception occurs in the task
        E extends Exception