Class ManagedExecutorServiceService

java.lang.Object
org.jboss.as.ee.concurrent.service.ManagedExecutorServiceService
All Implemented Interfaces:
org.jboss.msc.Service, org.jboss.msc.service.Service<org.glassfish.enterprise.concurrent.ManagedExecutorServiceAdapter>, org.jboss.msc.value.Value<org.glassfish.enterprise.concurrent.ManagedExecutorServiceAdapter>

public class ManagedExecutorServiceService extends Object
Service responsible for creating, starting and stopping a ManagedExecutorServiceImpl.

Note that the service's value is the executor's adapter, which does not allows lifecyle related invocations.

Author:
Eduardo Martins
  • Constructor Details

    • ManagedExecutorServiceService

      public ManagedExecutorServiceService(Consumer<org.glassfish.enterprise.concurrent.ManagedExecutorServiceAdapter> consumer, Supplier<org.glassfish.enterprise.concurrent.ContextServiceImpl> contextServiceSupplier, Supplier<ManagedThreadFactoryImpl> managedThreadFactorySupplier, Supplier<org.jboss.as.controller.ProcessStateNotifier> processStateNotifierSupplier, Supplier<org.wildfly.extension.requestcontroller.RequestController> requestControllerSupplier, String name, String jndiName, long hungTaskThreshold, long hungTaskTerminationPeriod, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, int queueCapacity, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, Integer threadPriority, Supplier<ManagedExecutorHungTasksPeriodicTerminationService> hungTasksPeriodicTerminationService)
      Parameters:
      consumer -
      contextServiceSupplier -
      managedThreadFactorySupplier -
      processStateNotifierSupplier -
      requestControllerSupplier -
      name -
      jndiName -
      hungTaskThreshold -
      hungTaskTerminationPeriod -
      longRunningTasks -
      corePoolSize -
      maxPoolSize -
      keepAliveTime -
      keepAliveTimeUnit -
      threadLifeTime -
      queueCapacity -
      rejectPolicy -
      threadPriority -
      See Also:
      • ManagedExecutorServiceImpl#ManagedExecutorServiceImpl(String, org.jboss.as.ee.concurrent.ManagedThreadFactoryImpl, long, boolean, int, int, long, java.util.concurrent.TimeUnit, long, int, org.glassfish.enterprise.concurrent.ContextServiceImpl, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy, org.wildfly.extension.requestcontroller.ControlPoint)
  • Method Details

    • getValue

      public org.glassfish.enterprise.concurrent.ManagedExecutorServiceAdapter getValue() throws IllegalStateException
      Throws:
      IllegalStateException
    • getExecutorService

      public ManagedExecutorServiceImpl getExecutorService() throws IllegalStateException
      Throws:
      IllegalStateException
    • getContextServiceSupplier

      public DelegatingSupplier<org.glassfish.enterprise.concurrent.ContextServiceImpl> getContextServiceSupplier()
    • start

      public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
      Specified by:
      start in interface org.jboss.msc.Service
      Throws:
      org.jboss.msc.service.StartException
    • stop

      public void stop(org.jboss.msc.service.StopContext context)
      Specified by:
      stop in interface org.jboss.msc.Service