Package fr.paris.lutece.test.mocks
Class MockManagedScheduledExecutorService
java.lang.Object
fr.paris.lutece.test.mocks.MockManagedScheduledExecutorService
- All Implemented Interfaces:
jakarta.enterprise.concurrent.ManagedExecutorService,jakarta.enterprise.concurrent.ManagedScheduledExecutorService,Executor,ExecutorService,ScheduledExecutorService
@ApplicationScoped
@Alternative
@Priority(10)
public class MockManagedScheduledExecutorService
extends Object
implements jakarta.enterprise.concurrent.ManagedScheduledExecutorService
Stands for a container-provided ManagedScheduledExecutorService when under java SE.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) <U> CompletableFuture<U>completedFuture(U value) <U> CompletionStage<U>completedStage(U value) <T> CompletableFuture<T>copy(CompletableFuture<T> stage) <T> CompletionStage<T>copy(CompletionStage<T> stage) void<U> CompletableFuture<U><U> CompletionStage<U>failedStage(Throwable ex) jakarta.enterprise.concurrent.ContextServiceinvokeAll(Collection<? extends Callable<T>> tasks) invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) <T> TinvokeAny(Collection<? extends Callable<T>> tasks) <T> TinvokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) booleanboolean<U> CompletableFuture<U><V> ScheduledFuture<V><V> ScheduledFuture<V>scheduleAtFixedRate(Runnable arg0, long arg1, long arg2, TimeUnit arg3) scheduleWithFixedDelay(Runnable arg0, long arg1, long arg2, TimeUnit arg3) voidshutdown()Future<?><T> Future<T><T> Future<T><U> CompletableFuture<U>supplyAsync(Supplier<U> supplier)
-
Constructor Details
-
MockManagedScheduledExecutorService
public MockManagedScheduledExecutorService()
-
-
Method Details
-
completedFuture
- Specified by:
completedFuturein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
completedStage
- Specified by:
completedStagein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
copy
- Specified by:
copyin interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
copy
- Specified by:
copyin interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
failedFuture
- Specified by:
failedFuturein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
failedStage
- Specified by:
failedStagein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
getContextService
public jakarta.enterprise.concurrent.ContextService getContextService()- Specified by:
getContextServicein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
newIncompleteFuture
- Specified by:
newIncompleteFuturein interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
runAsync
- Specified by:
runAsyncin interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
supplyAsync
- Specified by:
supplyAsyncin interfacejakarta.enterprise.concurrent.ManagedExecutorService
-
awaitTermination
- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException - Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException - Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException - Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceExecutorService
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceExecutorService
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceExecutorService
-
shutdownNow
- Specified by:
shutdownNowin interfaceExecutorService
-
submit
- Specified by:
submitin interfaceExecutorService
-
submit
- Specified by:
submitin interfaceExecutorService
-
submit
- Specified by:
submitin interfaceExecutorService
-
execute
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService
-
scheduleAtFixedRate
- Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable arg0, long arg1, long arg2, TimeUnit arg3) - Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService
-
schedule
- Specified by:
schedulein interfacejakarta.enterprise.concurrent.ManagedScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, jakarta.enterprise.concurrent.Trigger trigger) - Specified by:
schedulein interfacejakarta.enterprise.concurrent.ManagedScheduledExecutorService
-