Package org.wildfly.clustering.context
Interface Contextualizer
-
- All Known Subinterfaces:
ContextualExecutor
- All Known Implementing Classes:
CompositeContextualizer,ContextReferenceExecutor
public interface ContextualizerFacility for creating contextual tasks.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Runnablecontextualize(Runnable runner)Decorates the specified runner with a given context.<T> Callable<T>contextualize(Callable<T> caller)Decorates the specified caller with a given context.<T> Supplier<T>contextualize(Supplier<T> supplier)Decorates the specified supplier with a given context.<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.<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.
-
-
-
Method Detail
-
contextualize
Runnable contextualize(Runnable runner)
Decorates the specified runner with a given context.- Parameters:
runner- a runnable task- Returns:
- a contextual runner
-
contextualize
<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.- Type Parameters:
E- the exception type- Parameters:
runner- a runnable task- Returns:
- a contextual runner
-
contextualize
<T> Callable<T> contextualize(Callable<T> caller)
Decorates the specified caller with a given context.- Type Parameters:
T- the return type- Parameters:
runner- a callable task- Returns:
- a contextual caller
-
contextualize
<T> Supplier<T> contextualize(Supplier<T> supplier)
Decorates the specified supplier with a given context.- Type Parameters:
T- the return type- Parameters:
runner- a supplier task- Returns:
- a contextual supplier
-
contextualize
<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.- Type Parameters:
T- the return typeE- the exception type- Parameters:
runner- a supplier task- Returns:
- a contextual supplier
-
-