public class ContextReferenceExecutor<C> extends Object implements ContextualExecutor
| Constructor and Description |
|---|
ContextReferenceExecutor(C targetContext,
ContextReference<C> reference) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(Callable<T> caller)
Executes the specified caller with a given context.
|
<E extends Exception> |
execute(org.wildfly.common.function.ExceptionRunnable<E> runner) |
<T,E extends Exception> |
execute(org.wildfly.common.function.ExceptionSupplier<T,E> supplier)
Executes the specified supplier with a given context.
|
void |
execute(Runnable runner) |
<T> T |
execute(Supplier<T> supplier)
Executes the specified supplier with a given context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontextualize, contextualize, contextualize, contextualize, contextualizepublic ContextReferenceExecutor(C targetContext, ContextReference<C> reference)
public <E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> runner) throws E extends Exception
E extends Exceptionpublic <T> T execute(Callable<T> caller) throws Exception
ContextualExecutorexecute in interface ContextualExecutorT - the return typecaller - a callable taskException - if execution failspublic <T> T execute(Supplier<T> supplier)
ContextualExecutorexecute in interface ContextualExecutorT - the return typesupplier - a supplier taskpublic <T,E extends Exception> T execute(org.wildfly.common.function.ExceptionSupplier<T,E> supplier) throws E extends Exception
ContextualExecutorexecute in interface ContextualExecutorT - the return typeE - the exception typesupplier - a supplier taskE - if execution failsE extends ExceptionCopyright © 2022 JBoss by Red Hat. All rights reserved.