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

org.openl.spring.env.SysInfoPropertySource Maven / Gradle / Ivy

The newest version!
package org.openl.spring.env;

import java.util.Map;

import org.springframework.core.env.EnumerablePropertySource;

import org.openl.info.OpenLVersion;
import org.openl.util.StringUtils;

/**
 * Contain system information about OpenL and environment. Allows to monitor resources
 */
public class SysInfoPropertySource extends EnumerablePropertySource> {
    public static final String PROPS_NAME = "OpenL Info";

    SysInfoPropertySource() {
        super(PROPS_NAME, OpenLVersion.get());
    }

    @Override
    public String[] getPropertyNames() {
        return source.keySet().toArray(StringUtils.EMPTY_STRING_ARRAY);
    }

    @Override
    public Object getProperty(String name) {
        return source.get(name);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy