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

org.jboss.as.ee.concurrent.handle.NullContextHandle Maven / Gradle / Ivy

There is a newer version: 35.0.0.Beta1
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.ee.concurrent.handle;

import org.wildfly.security.manager.WildFlySecurityManager;

/**
 * A context handle without invocation context to set. For now it provides only the setup and reset of TCCL captured at handle creation.
 * @author Eduardo Martins
 */
public class NullContextHandle implements SetupContextHandle {

    private static final long serialVersionUID = 2928225776829357837L;
    private final SetupContextHandle tcclSetupHandle;

    public NullContextHandle() {
        tcclSetupHandle = new ClassLoaderContextHandleFactory.ClassLoaderSetupContextHandle(WildFlySecurityManager.getCurrentContextClassLoaderPrivileged());
    }

    @Override
    public ResetContextHandle setup() throws IllegalStateException {
        return tcclSetupHandle.setup();
    }

    @Override
    public String getFactoryName() {
        return "NULL";
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy