All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.extension.batch.BatchServiceNames Maven / Gradle / Ivy

There is a newer version: 11.0.0.Final
Show newest version
package org.wildfly.extension.batch;

import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.threads.ThreadsServices;
import org.jboss.msc.service.ServiceName;

/**
 * Service names for the batch subsystem.
 *
 * @author James R. Perkins
 */
public class BatchServiceNames {

    /**
     * The default service name fo the thread-pool
     */
    public static final ServiceName BASE_BATCH_THREAD_POOL_NAME = ThreadsServices.EXECUTOR.append("batch");

    /**
     * The defined name for the thread-pool, e.g. thread-pool=batch.
     */
    public static final ServiceName BATCH_THREAD_POOL_NAME = BASE_BATCH_THREAD_POOL_NAME.append("batch");

    /**
     * The name for the job executor
     */
    public static final ServiceName BATCH_JOB_EXECUTOR_NAME = ServiceName.JBOSS.append("batch", "job", "executor");

    /**
     * Creates a service name for the batch environment service.
     *
     * @param deploymentUnit the deployment unit to create the service name for
     *
     * @return the service name
     */
    public static ServiceName batchEnvironmentServiceName(final DeploymentUnit deploymentUnit) {
        return deploymentUnit.getServiceName().append("batch").append("environment");
    }

    /**
     * Creates the service name used for the bean manager on the deployment.
     *
     * @param deploymentUnit the deployment unit to create the service name for
     *
     * @return the service name
     */
    public static ServiceName beanManagerServiceName(final DeploymentUnit deploymentUnit) {
        return deploymentUnit.getServiceName().append("beanmanager");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy