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

com.tangosol.config.expression.SystemEnvironmentParameterResolver Maven / Gradle / Ivy

There is a newer version: 24.09
Show newest version
/*
 * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
 *
 * Licensed under the Universal Permissive License v 1.0 as shown at
 * http://oss.oracle.com/licenses/upl.
 */
package com.tangosol.config.expression;

import com.tangosol.coherence.config.Config;

/**
 * A {@link SystemEnvironmentParameterResolver} is a {@link ParameterResolver} that is
 * an environment getter for Coherence environment properties implemented using
 * {@link System#getenv(String)}.

 * @author jf 2015.04.15
 * @since Coherence 12.2.1
 */
public class SystemEnvironmentParameterResolver implements ParameterResolver
    {
    // ----- ParameterResolver methods --------------------------------
    /**
     * Resolve Coherence system property sName
     * 

* Log a WARNING if SecurityException occurs while accessing sName. * * @param sName system property name * * @return a {@link Parameter} representing the value of sName or * null if system property not found or if SecurityException was handled. */ @Override public Parameter resolve(String sName) { String sValue = Config.getenv(sName); return sValue == null ? null : new Parameter(sName, sValue); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy