Package org.wildfly.clustering.context
Interface Contextualizer
public interface Contextualizer
Facility for creating contextual tasks.
- Author:
- Paul Ferraro
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Contextualizercomposite(List<Contextualizer> contextualizers) contextualize(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.<V1,V2> BiConsumer<V1, V2> contextualize(BiConsumer<V1, V2> consumer) Decorates the specified consumer with a given context.<V1,V2, R> BiFunction<V1, V2, R> contextualize(BiFunction<V1, V2, R> function) Decorates the specified function with a given context.<V> Consumer<V>contextualize(Consumer<V> consumer) Decorates the specified consumer with a given context.<V,R> Function<V, R> contextualize(Function<V, R> function) Decorates the specified function with a given context.<T> Supplier<T>contextualize(Supplier<T> supplier) Decorates the specified supplier with a given context.static ContextualizerwithContextProvider(Supplier<Context> provider)
-
Field Details
-
NONE
-
-
Method Details
-
contextualize
Decorates the specified runner with a given context.- 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:
caller- a callable task- Returns:
- a contextual caller
-
contextualize
Decorates the specified supplier with a given context.- Type Parameters:
T- the return type- Parameters:
supplier- a supplier task- Returns:
- a contextual supplier
-
contextualize
Decorates the specified consumer with a given context.- Type Parameters:
V- the consumed value type- Parameters:
consumer- a consumer- Returns:
- a contextual consumer
-
contextualize
Decorates the specified consumer with a given context.- Type Parameters:
V1- the 1st consumed value typeV2- the 2nd consumed value type- Parameters:
consumer- a consumer- Returns:
- a contextual consumer
-
contextualize
Decorates the specified function with a given context.- Type Parameters:
V- the function parameter typeR- the function return type- Parameters:
function- a function- Returns:
- a contextual function
-
contextualize
Decorates the specified function with a given context.- Type Parameters:
V1- the 1st function parameter typeV2- the 2nd function parameter typeR- the function return type- Parameters:
function- a function- Returns:
- a contextual function
-
withContextProvider
-
composite
-