Class BaseExecutorServiceManager

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.impl.engine.BaseExecutorServiceManager
All Implemented Interfaces:
AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ExecutorServiceManager, org.apache.camel.StatefulService, org.apache.camel.StaticService, org.apache.camel.SuspendableService
Direct Known Subclasses:
DefaultExecutorServiceManager

public class BaseExecutorServiceManager extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.ExecutorServiceManager
Base ExecutorServiceManager which can be used for implementations
  • Constructor Details

    • BaseExecutorServiceManager

      public BaseExecutorServiceManager(org.apache.camel.CamelContext camelContext)
  • Method Details

    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
    • getThreadPoolFactory

      public org.apache.camel.spi.ThreadPoolFactory getThreadPoolFactory()
      Specified by:
      getThreadPoolFactory in interface org.apache.camel.spi.ExecutorServiceManager
    • setThreadPoolFactory

      public void setThreadPoolFactory(org.apache.camel.spi.ThreadPoolFactory threadPoolFactory)
      Specified by:
      setThreadPoolFactory in interface org.apache.camel.spi.ExecutorServiceManager
    • registerThreadPoolProfile

      public void registerThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile profile)
      Specified by:
      registerThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManager
    • getThreadPoolProfile

      public org.apache.camel.spi.ThreadPoolProfile getThreadPoolProfile(String id)
      Specified by:
      getThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManager
    • getDefaultThreadPoolProfile

      public org.apache.camel.spi.ThreadPoolProfile getDefaultThreadPoolProfile()
      Specified by:
      getDefaultThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManager
    • setDefaultThreadPoolProfile

      public void setDefaultThreadPoolProfile(org.apache.camel.spi.ThreadPoolProfile defaultThreadPoolProfile)
      Specified by:
      setDefaultThreadPoolProfile in interface org.apache.camel.spi.ExecutorServiceManager
    • getThreadNamePattern

      public String getThreadNamePattern()
      Specified by:
      getThreadNamePattern in interface org.apache.camel.spi.ExecutorServiceManager
    • setThreadNamePattern

      public void setThreadNamePattern(String threadNamePattern)
      Specified by:
      setThreadNamePattern in interface org.apache.camel.spi.ExecutorServiceManager
    • getShutdownAwaitTermination

      public long getShutdownAwaitTermination()
      Specified by:
      getShutdownAwaitTermination in interface org.apache.camel.spi.ExecutorServiceManager
    • setShutdownAwaitTermination

      public void setShutdownAwaitTermination(long shutdownAwaitTermination)
      Specified by:
      setShutdownAwaitTermination in interface org.apache.camel.spi.ExecutorServiceManager
    • resolveThreadName

      public String resolveThreadName(String name)
      Specified by:
      resolveThreadName in interface org.apache.camel.spi.ExecutorServiceManager
    • newThread

      public Thread newThread(String name, Runnable runnable)
      Specified by:
      newThread in interface org.apache.camel.spi.ExecutorServiceManager
    • newDefaultThreadPool

      public ExecutorService newDefaultThreadPool(Object source, String name)
      Specified by:
      newDefaultThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newDefaultScheduledThreadPool

      public ScheduledExecutorService newDefaultScheduledThreadPool(Object source, String name)
      Specified by:
      newDefaultScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newThreadPool

      public ExecutorService newThreadPool(Object source, String name, String profileId)
      Specified by:
      newThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newThreadPool

      public ExecutorService newThreadPool(Object source, String name, org.apache.camel.spi.ThreadPoolProfile profile)
      Specified by:
      newThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newThreadPool

      public ExecutorService newThreadPool(Object source, String name, int poolSize, int maxPoolSize)
      Specified by:
      newThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newSingleThreadExecutor

      public ExecutorService newSingleThreadExecutor(Object source, String name)
      Specified by:
      newSingleThreadExecutor in interface org.apache.camel.spi.ExecutorServiceManager
    • newCachedThreadPool

      public ExecutorService newCachedThreadPool(Object source, String name)
      Specified by:
      newCachedThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newFixedThreadPool

      public ExecutorService newFixedThreadPool(Object source, String name, int poolSize)
      Specified by:
      newFixedThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newSingleThreadScheduledExecutor

      public ScheduledExecutorService newSingleThreadScheduledExecutor(Object source, String name)
      Specified by:
      newSingleThreadScheduledExecutor in interface org.apache.camel.spi.ExecutorServiceManager
    • newScheduledThreadPool

      public ScheduledExecutorService newScheduledThreadPool(Object source, String name, org.apache.camel.spi.ThreadPoolProfile profile)
      Specified by:
      newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newScheduledThreadPool

      public ScheduledExecutorService newScheduledThreadPool(Object source, String name, String profileId)
      Specified by:
      newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • newScheduledThreadPool

      public ScheduledExecutorService newScheduledThreadPool(Object source, String name, int poolSize)
      Specified by:
      newScheduledThreadPool in interface org.apache.camel.spi.ExecutorServiceManager
    • shutdown

      public void shutdown(ExecutorService executorService)
      Specified by:
      shutdown in interface org.apache.camel.spi.ExecutorServiceManager
    • shutdownGraceful

      public void shutdownGraceful(ExecutorService executorService)
      Specified by:
      shutdownGraceful in interface org.apache.camel.spi.ExecutorServiceManager
    • shutdownGraceful

      public void shutdownGraceful(ExecutorService executorService, long shutdownAwaitTermination)
      Specified by:
      shutdownGraceful in interface org.apache.camel.spi.ExecutorServiceManager
    • shutdownNow

      public List<Runnable> shutdownNow(ExecutorService executorService)
      Specified by:
      shutdownNow in interface org.apache.camel.spi.ExecutorServiceManager
    • awaitTermination

      public boolean awaitTermination(ExecutorService executorService, long shutdownAwaitTermination) throws InterruptedException
      Specified by:
      awaitTermination in interface org.apache.camel.spi.ExecutorServiceManager
      Throws:
      InterruptedException
    • onNewExecutorService

      protected void onNewExecutorService(ExecutorService executorService)
      Strategy callback when a new ExecutorService have been created.
      Parameters:
      executorService - the created ExecutorService
    • doInit

      protected void doInit() throws Exception
      Overrides:
      doInit in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doShutdown

      protected void doShutdown() throws Exception
      Overrides:
      doShutdown in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • createThreadFactory

      protected ThreadFactory createThreadFactory(String name, boolean isDaemon)