Class ContextReferenceExecutor<C>

    • Constructor Detail

      • ContextReferenceExecutor

        public ContextReferenceExecutor​(C targetContext,
                                        ContextReference<C> reference)
    • Method Detail

      • execute

        public <E extends Exception> void execute​(org.wildfly.common.function.ExceptionRunnable<E> runner)
                                           throws E extends Exception
        Description copied from interface: ContextualExecutor
        Executes the specified runner.
        Specified by:
        execute in interface ContextualExecutor
        Type Parameters:
        E - the exception type
        Parameters:
        runner - a runnable task
        Throws:
        E - if execution fails
        E extends Exception
      • execute

        public <T> T execute​(Callable<T> caller)
                      throws Exception
        Description copied from interface: ContextualExecutor
        Executes the specified caller with a given context.
        Specified by:
        execute in interface ContextualExecutor
        Type Parameters:
        T - the return type
        Parameters:
        caller - a callable task
        Returns:
        the result of the caller
        Throws:
        Exception - if execution fails
      • execute

        public <T> T execute​(Supplier<T> supplier)
        Description copied from interface: ContextualExecutor
        Executes the specified supplier with a given context.
        Specified by:
        execute in interface ContextualExecutor
        Type Parameters:
        T - the return type
        Parameters:
        supplier - a supplier task
        Returns:
        the result of the supplier
      • execute

        public <T,​E extends Exception> T execute​(org.wildfly.common.function.ExceptionSupplier<T,​E> supplier)
                                                throws E extends Exception
        Description copied from interface: ContextualExecutor
        Executes the specified supplier with a given context.
        Specified by:
        execute in interface ContextualExecutor
        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