Package org.wildfly.clustering.context
Interface Contextualizer
- All Known Subinterfaces:
ContextualExecutor
- All Known Implementing Classes:
CompositeContextualizer,ContextReferenceExecutor
public interface Contextualizer
Facility for creating contextual tasks.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptioncontextualize(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 Details
-
contextualize
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
Decorates the specified caller with a given context.- Type Parameters:
T- the return type- Parameters:
runner- a callable task- Returns:
- a contextual caller
-
contextualize
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
-