// Path: chassis-support/src/main/java/com/kixeye/chassis/support/util/PropertyUtils.java
// public class PropertyUtils {
//     public static String getPropertyName(String placeHolder){
//         return placeHolder.replace("${","").replace("}","");
//     }
// 
// }


import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.kixeye.chassis.support.util.PropertyUtils;
import com.netflix.config.ConfigurationManager;
import javax.annotation.PostConstruct;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.event.ConfigurationEvent;
import org.apache.commons.configuration.event.ConfigurationListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
package com.kixeye.chassis.support.metrics.aws;

/*
 * #%L
 * Chassis Support
 * %%
 * Copyright (C) 2014 KIXEYE, Inc
 * %%
 * 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.
 * #L%
 */




/**
 * Spring configuration for publishing Metrics to AWS CloudWatch.
 *
 * @author dturner@kixeye.com
 */
@Configuration
@ComponentScan(basePackageClasses = MetricsCloudWatchConfiguration.class)
public class MetricsCloudWatchConfiguration {
    private static final Logger logger = LoggerFactory.getLogger(MetricsCloudWatchConfiguration.class);

    public static final String METRICS_AWS_ENABLED_PROPERTY_NAME = "${metrics.aws.enabled}";
    public static String METRICS_AWS_ENABLED;
    public static String METRICS_AWS_FILTER;
    public static String METRICS_AWS_PUBLISH_INTERVAL;
    public static String METRICS_AWS_PUBLISH_INTERVAL_UNIT;

    static {
// Path: chassis-support/src/main/java/com/kixeye/chassis/support/util/PropertyUtils.java
// public class PropertyUtils {
//     public static String getPropertyName(String placeHolder){
//         return placeHolder.replace("${","").replace("}","");
//     }
// 
// }


// Path: chassis-support/src/main/java/com/kixeye/chassis/support/metrics/aws/MetricsCloudWatchConfiguration.java
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.kixeye.chassis.support.util.PropertyUtils;
import com.netflix.config.ConfigurationManager;
import javax.annotation.PostConstruct;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.event.ConfigurationEvent;
import org.apache.commons.configuration.event.ConfigurationListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;

package com.kixeye.chassis.support.metrics.aws;

/*
 * #%L
 * Chassis Support
 * %%
 * Copyright (C) 2014 KIXEYE, Inc
 * %%
 * 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.
 * #L%
 */




/**
 * Spring configuration for publishing Metrics to AWS CloudWatch.
 *
 * @author dturner@kixeye.com
 */
@Configuration
@ComponentScan(basePackageClasses = MetricsCloudWatchConfiguration.class)
public class MetricsCloudWatchConfiguration {
    private static final Logger logger = LoggerFactory.getLogger(MetricsCloudWatchConfiguration.class);

    public static final String METRICS_AWS_ENABLED_PROPERTY_NAME = "${metrics.aws.enabled}";
    public static String METRICS_AWS_ENABLED;
    public static String METRICS_AWS_FILTER;
    public static String METRICS_AWS_PUBLISH_INTERVAL;
    public static String METRICS_AWS_PUBLISH_INTERVAL_UNIT;

    static {
        METRICS_AWS_ENABLED = PropertyUtils.getPropertyName(METRICS_AWS_ENABLED_PROPERTY_NAME);