Class HandoffExecutorResolver.AbstractThreadFactoryResolver

    • Constructor Detail

      • AbstractThreadFactoryResolver

        public AbstractThreadFactoryResolver()
    • Method Detail

      • resolveHandoffExecutor

        public org.jboss.msc.service.ServiceName resolveHandoffExecutor​(String handoffExecutorName,
                                                                        String threadPoolName,
                                                                        org.jboss.msc.service.ServiceName threadPoolServiceName,
                                                                        org.jboss.msc.service.ServiceTarget serviceTarget)
        Description copied from interface: HandoffExecutorResolver
        Resolves the service name of the handoff executor a thread pool service should use, optionally providing a default executor in case the thread pool does not have a specifically configured handoff executor.
        Specified by:
        resolveHandoffExecutor in interface HandoffExecutorResolver
        Parameters:
        handoffExecutorName - the simple name of the handoff executor. Typically a reference value from the thread pool resource's configuration. Can be null in which case a default handoff executor may be returned.
        threadPoolName - the name of the thread pool
        threadPoolServiceName - the full name of the Service that provides the thread pool
        serviceTarget - service target that is installing the thread pool service; can be used to install a ThreadFactoryService
        Returns:
        the ServiceName of the executor service the thread pool should use. May be {@link null}
      • resolveNamedHandoffExecutor

        protected abstract org.jboss.msc.service.ServiceName resolveNamedHandoffExecutor​(String handoffExecutorName,
                                                                                         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.
        Parameters:
        handoffExecutorName - the simple name of the thread factory. Will not be null
        threadPoolName - the simple name of the related thread pool
        threadPoolServiceName - the full service name of the thread pool
        Returns:
        the ServiceName of the ThreadFactoryService the thread pool should use. Cannot be null
      • releaseNamedHandoffExecutor

        protected void releaseNamedHandoffExecutor​(String handoffExecutorName,
                                                   String threadPoolName,
                                                   org.jboss.msc.service.ServiceName threadPoolServiceName,
                                                   OperationContext context)
        Handles the work of releaseHandoffExecutor(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.
        Parameters:
        handoffExecutorName - the simple name of the thread factory. Will not be null
        threadPoolName - the simple name of the related thread pool
        threadPoolServiceName - the full service name of the thread pool
        context - the context of the current operation; can be used to perform any necessary service removals
      • resolveDefaultHandoffExecutor

        protected org.jboss.msc.service.ServiceName resolveDefaultHandoffExecutor​(String threadPoolName,
                                                                                  org.jboss.msc.service.ServiceName threadPoolServiceName,
                                                                                  org.jboss.msc.service.ServiceTarget serviceTarget)
        Optionally provides the service name of a default handoff executor. This implementation simply returns null, meaning there is no default.
        Parameters:
        threadPoolName - the name of the thread pool
        threadPoolServiceName - the full name of the Service that provides the thread pool
        serviceTarget - service target that is installing the thread pool service; can be used to install a ThreadFactoryService
        Returns:
        the ServiceName of the ThreadFactoryService the thread pool should use. May be null