Class 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.
    • 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.
      • Methods inherited from class java.util.concurrent.AbstractExecutorService

        invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.