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

org.eclipse.microprofile.context.spi.ContextManagerExtension Maven / Gradle / Ivy

/*
 * Copyright (c) 2018,2019 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.eclipse.microprofile.context.spi;

/**
 * 

ContextManagerExtension instances receive * notification upon creation of each {@link ContextManager}.

* *

This serves as a convenient invocation point for enabling system wide * context propagator hooks.

* *

Implementations of ContextManagerExtension * and related classes are packaged within a third party JAR file, or they can * be supplied by the container or MicroProfile Context Propagation implementation. * ContextManagerExtensions are made discoverable * via the standard ServiceLoader mechanism. The JAR file that * packages it must include a file of the following name and location,

* * META-INF/services/org.eclipse.microprofile.context.spi.ContextManagerExtension * *

The content of the aforementioned file must be one or more lines, each * specifying the fully qualified name of a * ContextManagerExtension implementation that is * provided within the JAR file.

* *

Upon successful {@link ContextManager} creation, * the MicroProfile Context Propagation implementation must subsequently query the container's * ServiceLoader for all * ContextManagerExtensions and call the * setup method on each instance.

*/ public interface ContextManagerExtension { /** * This method is called after every ContextManager * instance has been successfully created. Implementations may use * the supplied manager to create and configure builders and build * instances of ManagedExecutor and * ThreadContext. * * @param manager the ContextManager instance that was * just created. */ void setup(ContextManager manager); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy