Package org.awaitility.core
Class InternalExecutorServiceFactory
java.lang.Object
org.awaitility.core.InternalExecutorServiceFactory
Please don't use this class directly, it's for internal purposes only and will be moved/renamed without notice!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorServiceCreates an executor services that creates thread's based on thethread supplier.static ExecutorServiceCreates an executor service that creates thread's based on thethread supplierprivate static StringgenerateDefaultThreadName(String alias) static ExecutorService
-
Constructor Details
-
InternalExecutorServiceFactory
public InternalExecutorServiceFactory()
-
-
Method Details
-
sameThreadExecutorService
- Returns:
- A executor service that executes tasks in the caller's thread
-
create
Creates an executor service that creates thread's based on thethread supplier- Parameters:
threadSupplier- The thread supplier- Returns:
- An executor service that will use the thread created by the
threadSupplierwhen polling
-
create
public static ExecutorService create(BiFunction<Runnable, String, Thread> threadSupplier, String alias) Creates an executor services that creates thread's based on thethread supplier. The first argument to thethreadSupplieris the Runnable (the condition that will be evaluated). The second argument is the default thread name generated by Awaitility.- Parameters:
threadSupplier- The thread supplier- Returns:
- An executor service that will use the thread created by the
threadSupplierwhen polling
-
generateDefaultThreadName
-