public abstract static class ThreadFactoryResolver.AbstractThreadFactoryResolver extends Object implements ThreadFactoryResolver
ThreadFactoryResolver implementations that handles the case of a null
threadFactoryName by installing a ThreadFactoryService whose service name is
the service name of the thread pool with thread-factory appended.ThreadFactoryResolver.AbstractThreadFactoryResolver, ThreadFactoryResolver.SimpleResolver| Constructor and Description |
|---|
AbstractThreadFactoryResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getThreadGroupName(String threadPoolName) |
protected void |
releaseNamedThreadFactory(String threadFactoryName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
Handles the work of
releaseThreadFactory(String, String, ServiceName, OperationContext) for the case
where threadFactoryName is not null. |
void |
releaseThreadFactory(String threadFactoryName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
Releases the thread factory, doing any necessary cleanup, such as removing a default thread factory that
was installed by
ThreadFactoryResolver.resolveThreadFactory(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget). |
protected abstract org.jboss.msc.service.ServiceName |
resolveNamedThreadFactory(String threadFactoryName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName)
Create a service name to use for the thread factory in the case where a simple name for the factory was provided.
|
org.jboss.msc.service.ServiceName |
resolveThreadFactory(String threadFactoryName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
org.jboss.msc.service.ServiceTarget serviceTarget)
Resolves the service name of the thread factory a thread pool service should use, providing a default thread
factory in case the thread pool does not have a specifically configured thread factory.
|
public org.jboss.msc.service.ServiceName resolveThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, org.jboss.msc.service.ServiceTarget serviceTarget)
ThreadFactoryResolverresolveThreadFactory in interface ThreadFactoryResolverthreadFactoryName - the simple name of the thread factory. Typically a reference value from
the thread pool resource's configuration. Can be null in which case a
default thread factory should be returned.threadPoolName - the name of the thread poolthreadPoolServiceName - the full name of the Service that provides the thread poolserviceTarget - service target that is installing the thread pool service; can be used to install
a ThreadFactoryServiceServiceName of the ThreadFactoryService the thread pool should use. Cannot be
nullpublic void releaseThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, OperationContext context)
ThreadFactoryResolverThreadFactoryResolver.resolveThreadFactory(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).releaseThreadFactory in interface ThreadFactoryResolverthreadFactoryName - the simple name of the thread factory. Typically a reference value from
the thread pool resource's configuration. Can be null in which case a
default thread factory should be released.threadPoolName - the name of the thread poolthreadPoolServiceName - the full name of the Service that provides the thread poolcontext - the context of the current operation; can be used to perform any necessary
service removalsprotected abstract org.jboss.msc.service.ServiceName resolveNamedThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName)
threadFactoryName - the simple name of the thread factory. Will not be nullthreadPoolName - the simple name of the related thread poolthreadPoolServiceName - the full service name of the thread poolServiceName of the ThreadFactoryService the thread pool should use. Cannot be
nullprotected void releaseNamedThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, OperationContext context)
releaseThreadFactory(String, String, ServiceName, OperationContext) for the case
where threadFactoryName is not null. This default implementation does nothing, assuming
the thread factory is independently managed from the pool.threadFactoryName - the simple name of the thread factory. Will not be nullthreadPoolName - the simple name of the related thread poolthreadPoolServiceName - the full service name of the thread poolcontext - the context of the current operation; can be used to perform any necessary
service removalsCopyright © 2017 JBoss by Red Hat. All rights reserved.