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 Type
    Method
    Description
    Decorates the specified runner with a given context.
    <T> Callable<T>
    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

      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 type
      E - the exception type
      Parameters:
      runner - a supplier task
      Returns:
      a contextual supplier