Package org.jboss.as.threads
Interface ThreadFactoryResolver
-
- All Known Implementing Classes:
ThreadFactoryResolver.AbstractThreadFactoryResolver,ThreadFactoryResolver.SimpleResolver
public interface ThreadFactoryResolverResolves the service name of the thread factory a thread pool service should use. Provides a default thread factory for a thread pool in case the thread pool does not have a specifically configured thread factory. The absence of a specifically configured thread pool would be typical.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classThreadFactoryResolver.AbstractThreadFactoryResolverBase class forThreadFactoryResolverimplementations that handles the case of a nullthreadFactoryNameby installing aThreadFactoryServicewhose service name is the service name of the thread pool withthread-factoryappended.static classThreadFactoryResolver.SimpleResolverExtendsThreadFactoryResolver.AbstractThreadFactoryResolverto deal with named thread factories by appending their simple name to a provided base name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreleaseThreadFactory(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 byresolveThreadFactory(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).org.jboss.msc.service.ServiceNameresolveThreadFactory(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.
-
-
-
Method Detail
-
resolveThreadFactory
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.- Parameters:
threadFactoryName- the simple name of the thread factory. Typically a reference value from the thread pool resource's configuration. Can benullin which case a default thread factory should be returned.threadPoolName- the name of the thread poolthreadPoolServiceName- the full name of theServicethat provides the thread poolserviceTarget- service target that is installing the thread pool service; can be used to install aThreadFactoryService- Returns:
- the
ServiceNameof theThreadFactoryServicethe thread pool should use. Cannot benull
-
releaseThreadFactory
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 byresolveThreadFactory(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).- Parameters:
threadFactoryName- the simple name of the thread factory. Typically a reference value from the thread pool resource's configuration. Can benullin which case a default thread factory should be released.threadPoolName- the name of the thread poolthreadPoolServiceName- the full name of theServicethat provides the thread poolcontext- the context of the current operation; can be used to perform any necessaryservice removals
-
-