Package org.apache.stratos.load.balancer.extension.api

Examples of org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension


public class Main {
    private static final Log log = LogFactory.getLog(Main.class);

    public static void main(String[] args) {

        LoadBalancerExtension extension = null;
        try {
            // Configure log4j properties
            PropertyConfigurator.configure(System.getProperty("log4j.properties.file.path"));

            if (log.isInfoEnabled()) {
                log.info("HAProxy extension started");
            }

            // Validate runtime parameters
            HAProxyContext.getInstance().validate();
            extension = new LoadBalancerExtension(new HAProxy(), (HAProxyContext.getInstance().isCEPStatsPublisherEnabled() ? new HAProxyStatisticsReader() : null));
            Thread thread = new Thread(extension);
            thread.start();
        } catch (Exception e) {
            if (log.isErrorEnabled()) {
                log.error(e);
            }
            if (extension != null) {
                extension.terminate();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.