Class JadexExecutorServiceAdapter
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- jadex.bridge.service.types.threadpool.JadexExecutorServiceAdapter
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
public class JadexExecutorServiceAdapter extends java.util.concurrent.AbstractExecutorService
Provides access to the Jadex thread pools as a Java ExecutorService.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.Thread>
currentthreads
Current threads.protected IThreadPool
threadpool
The Jadex thread pool.
-
Constructor Summary
Constructors Constructor Description JadexExecutorServiceAdapter(IThreadPool threadpool)
Creates the adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
Override.void
execute(java.lang.Runnable command)
Override.boolean
isShutdown()
Override.boolean
isTerminated()
Override.void
shutdown()
Override.java.util.List<java.lang.Runnable>
shutdownNow()
Override.
-
-
-
Field Detail
-
threadpool
protected IThreadPool threadpool
The Jadex thread pool.
-
currentthreads
protected java.util.List<java.lang.Thread> currentthreads
Current threads.
-
-
Constructor Detail
-
JadexExecutorServiceAdapter
public JadexExecutorServiceAdapter(IThreadPool threadpool)
Creates the adapter.- Parameters:
threadpool
- The Jadex thread pool to use.
-
-
Method Detail
-
shutdown
public void shutdown()
Override.
-
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
Override.
-
isShutdown
public boolean isShutdown()
Override.
-
isTerminated
public boolean isTerminated()
Override.
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Override.- Throws:
java.lang.InterruptedException
-
execute
public void execute(java.lang.Runnable command)
Override.
-
-