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

org.eclipse.microprofile.config.spi.package-info Maven / Gradle / Ivy

/*
 *******************************************************************************
 * Copyright (c) 2016-2017 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.
 *******************************************************************************/

/**
 * 

This package contains classes which are used to extend the standard functionality in a portable way. *

A user can provide own {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} and * {@link org.eclipse.microprofile.config.spi.Converter Converters} to extend the information available in the Config. * *

The package also contains the class {@link org.eclipse.microprofile.config.spi.ConfigProviderResolver} * which is used to pick up the actual implementation. *

Usage

*

This is used to build up a builder and manually add {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources}..

* * *
    *
  1. Create a builder: *
    ConfigProviderResolver resolver = ConfigProviderResolver.instance(); 
    *
    ConfigBuilder builder = resolver.getBuilder();
    *
  2. *
  3. Add config sources and build: *
     * Config config = builder.addDefaultSources().withSources(mySource).withConverters(myConverter).build;
     * 
    *
  4. *
  5. (optional)Manage the lifecycle of the config *
     resolver.registerConfig(config, classloader);
    *
     resolver.releaseConfig(config);
    *
  6. *
* @author Emily Jiang * @author Mark Struberg * */ @org.osgi.annotation.versioning.Version("1.4") package org.eclipse.microprofile.config.spi;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy