public interface ThreadFactoryResolver
Modifier and Type | Interface and Description |
---|---|
static class |
ThreadFactoryResolver.AbstractThreadFactoryResolver
Base class for
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. |
static class |
ThreadFactoryResolver.SimpleResolver
Extends
ThreadFactoryResolver.AbstractThreadFactoryResolver to deal with named thread factories by appending their
simple name to a provided base name. |
Modifier and Type | Method and Description |
---|---|
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
resolveThreadFactory(String, String, ServiceName, ServiceTarget, List, ServiceListener[]) . |
org.jboss.msc.service.ServiceName |
resolveThreadFactory(String threadFactoryName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
org.jboss.msc.service.ServiceTarget serviceTarget,
List<org.jboss.msc.service.ServiceController<?>> newControllers,
org.jboss.msc.service.ServiceListener<? super ThreadFactory>... newServiceListeners)
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.
|
org.jboss.msc.service.ServiceName resolveThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, org.jboss.msc.service.ServiceTarget serviceTarget, List<org.jboss.msc.service.ServiceController<?>> newControllers, org.jboss.msc.service.ServiceListener<? super ThreadFactory>... newServiceListeners)
threadFactoryName
- 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 ThreadFactoryService
newControllers
- a list of ServiceController
s that the serviceTarget
is installing. If
the implementation adds a new service controller, it should add it to this list. May
be null
newServiceListeners
- ServiceListener
s that should be added to any newly created service. May be
null
ServiceName
of the ThreadFactoryService
the thread pool should use. Cannot be
null
void releaseThreadFactory(String threadFactoryName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, OperationContext context)
resolveThreadFactory(String, String, ServiceName, ServiceTarget, List, ServiceListener[])
.threadFactoryName
- 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 removals
Copyright © 2015 JBoss by Red Hat. All rights reserved.