Interface ContextualExecutor

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default Runnable contextualize​(Runnable runner)
      Decorates the specified runner with a given context.
      default <T> Callable<T> contextualize​(Callable<T> caller)
      Decorates the specified caller with a given context.
      default <T> Supplier<T> contextualize​(Supplier<T> supplier)
      Decorates the specified supplier with a given context.
      default <E extends Exception>
      org.wildfly.common.function.ExceptionRunnable<E>
      contextualize​(org.wildfly.common.function.ExceptionRunnable<E> runner)
      Decorates the specified runner with a given context.
      default <T,​E extends Exception>
      org.wildfly.common.function.ExceptionSupplier<T,​E>
      contextualize​(org.wildfly.common.function.ExceptionSupplier<T,​E> supplier)
      Decorates the specified supplier with a given context.
      <T> T execute​(Callable<T> caller)
      Executes the specified caller with a given context.
      <T> T execute​(Supplier<T> supplier)
      Executes the specified supplier with a given context.
      <E extends Exception>
      void
      execute​(org.wildfly.common.function.ExceptionRunnable<E> runner)
      Executes the specified runner.
      <T,​E extends Exception>
      T
      execute​(org.wildfly.common.function.ExceptionSupplier<T,​E> supplier)
      Executes the specified supplier with a given context.
    • Method Detail

      • execute

        <E extends Exception> void execute​(org.wildfly.common.function.ExceptionRunnable<E> runner)
                                    throws E extends Exception
        Executes the specified runner.
        Type Parameters:
        E - the exception type
        Parameters:
        runner - a runnable task
        Throws:
        E - if execution fails
        E extends Exception
      • execute

        <T> T execute​(Callable<T> caller)
               throws Exception
        Executes the specified caller with a given context.
        Type Parameters:
        T - the return type
        Parameters:
        caller - a callable task
        Returns:
        the result of the caller
        Throws:
        Exception - if execution fails
      • execute

        <T> T execute​(Supplier<T> supplier)
        Executes the specified supplier with a given context.
        Type Parameters:
        T - the return type
        Parameters:
        supplier - a supplier task
        Returns:
        the result of the supplier
      • execute

        <T,​E extends Exception> T execute​(org.wildfly.common.function.ExceptionSupplier<T,​E> supplier)
                                         throws E extends Exception
        Executes the specified supplier with a given context.
        Type Parameters:
        T - the return type
        E - the exception type
        Parameters:
        supplier - a supplier task
        Returns:
        the result of the supplier
        Throws:
        E - if execution fails
        E extends Exception
      • contextualize

        default Runnable contextualize​(Runnable runner)
        Description copied from interface: Contextualizer
        Decorates the specified runner with a given context.
        Specified by:
        contextualize in interface Contextualizer
        Parameters:
        runner - a runnable task
        Returns:
        a contextual runner
      • contextualize

        default <E extends Exception> org.wildfly.common.function.ExceptionRunnable<E> contextualize​(org.wildfly.common.function.ExceptionRunnable<E> runner)
        Description copied from interface: Contextualizer
        Decorates the specified runner with a given context.
        Specified by:
        contextualize in interface Contextualizer
        Type Parameters:
        E - the exception type
        Parameters:
        runner - a runnable task
        Returns:
        a contextual runner
      • contextualize

        default <T> Callable<T> contextualize​(Callable<T> caller)
        Description copied from interface: Contextualizer
        Decorates the specified caller with a given context.
        Specified by:
        contextualize in interface Contextualizer
        Type Parameters:
        T - the return type
        Returns:
        a contextual caller
      • contextualize

        default <T> Supplier<T> contextualize​(Supplier<T> supplier)
        Description copied from interface: Contextualizer
        Decorates the specified supplier with a given context.
        Specified by:
        contextualize in interface Contextualizer
        Type Parameters:
        T - the return type
        Returns:
        a contextual supplier
      • contextualize

        default <T,​E extends Exception> org.wildfly.common.function.ExceptionSupplier<T,​E> contextualize​(org.wildfly.common.function.ExceptionSupplier<T,​E> supplier)
        Description copied from interface: Contextualizer
        Decorates the specified supplier with a given context.
        Specified by:
        contextualize in interface Contextualizer
        Type Parameters:
        T - the return type
        E - the exception type
        Returns:
        a contextual supplier