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

org.jboss.arquillian.testenricher.msc.ServiceTargetAssociation Maven / Gradle / Ivy

There is a newer version: 5.1.0.Beta6
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */
package org.jboss.arquillian.testenricher.msc;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import org.jboss.msc.service.ServiceTarget;

/**
 * A thread local {@link ServiceTarget} association
 *
 * @author [email protected]
 * @author Stuart Douglas
 * @since 18-Nov-2010
 */
public final class ServiceTargetAssociation {

    private static ConcurrentMap association = new ConcurrentHashMap<>();

    public static ServiceTarget getServiceTarget(final String className) {
        return association.get(className);
    }

    public static void setServiceTarget(final String className, ServiceTarget type) {
        association.put(className, type);
    }

    public static void clearServiceTarget(final String className) {
        association.remove(className);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy