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.<V1,V2, E extends Exception>
org.wildfly.common.function.ExceptionBiConsumer<V1, V2, E> contextualize(org.wildfly.common.function.ExceptionBiConsumer<V1, V2, E> consumer) Decorates the specified consumer with a given context.<V1,V2, R, E extends Exception>
org.wildfly.common.function.ExceptionBiFunction<V1, V2, R, E> contextualize(org.wildfly.common.function.ExceptionBiFunction<V1, V2, R, E> function) Decorates the specified function with a given context.<V,E extends Exception>
org.wildfly.common.function.ExceptionConsumer<V, E> contextualize(org.wildfly.common.function.ExceptionConsumer<V, E> consumer) Decorates the specified consumer with a given context.<V,R, E extends Exception>
org.wildfly.common.function.ExceptionFunction<V, R, E> contextualize(org.wildfly.common.function.ExceptionFunction<V, R, E> function) Decorates the specified function 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.static ContextualizerwithContextProvider(Supplier<Context> provider)
-
Field Details
-
NONE
-
-
Method Details
-
contextualize
-
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
-
contextualize
-
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:
supplier- a supplier task- Returns:
- a contextual supplier
-
contextualize
-
contextualize
<V,E extends Exception> org.wildfly.common.function.ExceptionConsumer<V,E> contextualize(org.wildfly.common.function.ExceptionConsumer<V, E> consumer) Decorates the specified consumer with a given context.- Type Parameters:
V- the consumed value typeE- the exception 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
<V1,V2, org.wildfly.common.function.ExceptionBiConsumer<V1,E extends Exception> V2, contextualizeE> (org.wildfly.common.function.ExceptionBiConsumer<V1, V2, E> consumer) Decorates the specified consumer with a given context.- Type Parameters:
V1- the 1st consumed value typeV2- the 2nd consumed value typeE- the exception type- Parameters:
consumer- a consumer- Returns:
- a contextual consumer
-
contextualize
-
contextualize
<V,R, org.wildfly.common.function.ExceptionFunction<V,E extends Exception> R, contextualizeE> (org.wildfly.common.function.ExceptionFunction<V, R, E> function) Decorates the specified function with a given context.- Type Parameters:
V- the function parameter typeR- the function return typeE- the exception 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
-
contextualize
<V1,V2, org.wildfly.common.function.ExceptionBiFunction<V1,R, E extends Exception> V2, contextualizeR, E> (org.wildfly.common.function.ExceptionBiFunction<V1, V2, R, E> function) Decorates the specified function with a given context.- Type Parameters:
V1- the 1st function parameter typeV2- the 2nd function parameter typeR- the function return typeE- the exception type- Parameters:
function- a function- Returns:
- a contextual function
-
withContextProvider
-
composite
-