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

org.jolokia.support.spring.SpringJolokiaConfigHolder Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package org.jolokia.support.spring;

/*
 * Copyright 2009-2013 Roland Huss
 *
 * 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.
 */

import java.util.HashMap;
import java.util.Map;

import org.springframework.core.Ordered;

/**
 * Configuration wrapper for a spring based configuration. It simply wraps a string-string map
 * for values.
 * The content of this object is used for building up a {@link org.jolokia.jvmagent.JolokiaServerConfig} for
 * the server to start.
 * 

* Multiple config objects can be present in a context, their precedence in decided * upon the order: The higher the order, the more important the configuration is (overriding * lower ordered configs). A server will pick them up, if its lookupConfigs property * is set to true (by default it is "false"). *

* You should use <jolokia:config> for defining configuration, either as standalone * configuration (if using the "plugin") or as an embedded element to <jolokia:server> * * @author roland * @since 28.12.12 */ public class SpringJolokiaConfigHolder implements Ordered { // configuration private Map config = new HashMap<>(); // order for multiple configurations available private int order; /** * Get tge configuration as a free-form map * @return config map */ public Map getConfig() { return config; } /** * Set the configuration values * * @param pConfig configuration to set */ public void setConfig(Map pConfig) { config = pConfig; } /** * Set the order or priority of this configuration. Higher orders mean higher priority. * * @param pOrder order to set */ public void setOrder(int pOrder) { order = pOrder; } /** {@inheritDoc} */ public int getOrder() { return order; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy