Package org.glassfish.concurrent.runtime
Class ConcurrentRuntime
- java.lang.Object
-
- org.glassfish.concurrent.runtime.ConcurrentRuntime
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct,org.glassfish.hk2.api.PreDestroy
@Service @Singleton public class ConcurrentRuntime extends Object implements org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroy
This class provides API to create various Concurrency Utilities objects
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTEXT_INFO_CLASSLOADERstatic StringCONTEXT_INFO_JNDIstatic StringCONTEXT_INFO_SECURITYstatic StringCONTEXT_INFO_WORKAREA
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.enterprise.concurrent.ContextServiceImplgetContextService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ContextServiceConfig config)org.glassfish.enterprise.concurrent.ManagedExecutorServiceImplgetManagedExecutorService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedExecutorServiceConfig config)org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceImplgetManagedScheduledExecutorService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedScheduledExecutorServiceConfig config)org.glassfish.enterprise.concurrent.ManagedThreadFactoryImplgetManagedThreadFactory(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedThreadFactoryConfig config)static ConcurrentRuntimegetRuntime()Returns the ConcurrentRuntime instance.voidpostConstruct()voidpreDestroy()voidshutdownContextService(String jndiName)voidshutdownManagedExecutorService(String jndiName)voidshutdownManagedThreadFactory(String jndiName)voidshutdownScheduledManagedExecutorService(String jndiName)
-
-
-
Field Detail
-
CONTEXT_INFO_CLASSLOADER
public static final String CONTEXT_INFO_CLASSLOADER
- See Also:
- Constant Field Values
-
CONTEXT_INFO_JNDI
public static final String CONTEXT_INFO_JNDI
- See Also:
- Constant Field Values
-
CONTEXT_INFO_SECURITY
public static final String CONTEXT_INFO_SECURITY
- See Also:
- Constant Field Values
-
CONTEXT_INFO_WORKAREA
public static final String CONTEXT_INFO_WORKAREA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRuntime
public static ConcurrentRuntime getRuntime()
Returns the ConcurrentRuntime instance. It follows singleton pattern and only one instance exists at any point of time. External entities need to call this method to get ConcurrentRuntime instance- Returns:
- ConcurrentRuntime instance
-
getContextService
public org.glassfish.enterprise.concurrent.ContextServiceImpl getContextService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ContextServiceConfig config)
-
shutdownContextService
public void shutdownContextService(String jndiName)
-
getManagedExecutorService
public org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl getManagedExecutorService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedExecutorServiceConfig config)
-
shutdownManagedExecutorService
public void shutdownManagedExecutorService(String jndiName)
-
getManagedScheduledExecutorService
public org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceImpl getManagedScheduledExecutorService(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedScheduledExecutorServiceConfig config)
-
shutdownScheduledManagedExecutorService
public void shutdownScheduledManagedExecutorService(String jndiName)
-
getManagedThreadFactory
public org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl getManagedThreadFactory(org.glassfish.resourcebase.resources.api.ResourceInfo resource, ManagedThreadFactoryConfig config)
-
shutdownManagedThreadFactory
public void shutdownManagedThreadFactory(String jndiName)
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
preDestroy
public void preDestroy()
- Specified by:
preDestroyin interfaceorg.glassfish.hk2.api.PreDestroy
-
-