Class ManagedScheduledExecutorServiceService
- java.lang.Object
-
- org.jboss.as.ee.concurrent.service.ManagedScheduledExecutorServiceService
-
- All Implemented Interfaces:
org.jboss.msc.Service
,org.jboss.msc.service.Service<org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter>
,org.jboss.msc.value.Value<org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter>
public class ManagedScheduledExecutorServiceService extends Object
Service responsible for creating, starting and stopping a ManagedScheduledExecutorServiceImpl. Note that the service's value is the executor's adapter, which does not allows lifecyle related invocations.- Author:
- Eduardo Martins
-
-
Constructor Summary
Constructors Constructor Description ManagedScheduledExecutorServiceService(Consumer<org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter> consumer, Supplier<org.glassfish.enterprise.concurrent.ContextServiceImpl> contextServiceSupplier, Supplier<ManagedThreadFactoryImpl> managedThreadFactorySupplier, Supplier<org.wildfly.extension.requestcontroller.RequestController> requestControllerSupplier, String name, String jndiName, long hungTaskThreshold, long hungTaskTerminationPeriod, boolean longRunningTasks, int corePoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, Integer threadPriority, Supplier<ManagedExecutorHungTasksPeriodicTerminationService> hungTasksPeriodicTerminationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DelegatingSupplier<org.glassfish.enterprise.concurrent.ContextServiceImpl>
getContextServiceSupplier()
ManagedScheduledExecutorServiceImpl
getExecutorService()
org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter
getValue()
void
start(org.jboss.msc.service.StartContext context)
void
stop(org.jboss.msc.service.StopContext context)
-
-
-
Constructor Detail
-
ManagedScheduledExecutorServiceService
public ManagedScheduledExecutorServiceService(Consumer<org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter> consumer, Supplier<org.glassfish.enterprise.concurrent.ContextServiceImpl> contextServiceSupplier, Supplier<ManagedThreadFactoryImpl> managedThreadFactorySupplier, Supplier<org.wildfly.extension.requestcontroller.RequestController> requestControllerSupplier, String name, String jndiName, long hungTaskThreshold, long hungTaskTerminationPeriod, boolean longRunningTasks, int corePoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, Integer threadPriority, Supplier<ManagedExecutorHungTasksPeriodicTerminationService> hungTasksPeriodicTerminationService)
- Parameters:
consumer
-contextServiceSupplier
-managedThreadFactorySupplier
-requestControllerSupplier
-name
-jndiName
-hungTaskThreshold
-longRunningTasks
-corePoolSize
-keepAliveTime
-keepAliveTimeUnit
-threadLifeTime
-rejectPolicy
-threadPriority
-- See Also:
ManagedScheduledExecutorServiceImpl(String, org.jboss.as.ee.concurrent.ManagedThreadFactoryImpl, long, boolean, int, long, java.util.concurrent.TimeUnit, long, org.glassfish.enterprise.concurrent.ContextServiceImpl, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy, org.wildfly.extension.requestcontroller.ControlPoint)
-
-
Method Detail
-
getValue
public org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter getValue() throws IllegalStateException
- Throws:
IllegalStateException
-
getExecutorService
public ManagedScheduledExecutorServiceImpl 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 interfaceorg.jboss.msc.Service
- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
-
-