Examples of Modcluster


Examples of io.undertow.server.handlers.proxy.mod_cluster.ModCluster

    static final int pport = Integer.parseInt(System.getProperty("io.undertow.examples.proxy.PORT", "8000"));

    public static void main(final String[] args) {
        final Undertow server;

        final ModCluster modCluster = ModCluster.builder().build();
        try {
            if (chost == null) {
                // We are going to guess it.
                chost = java.net.InetAddress.getLocalHost().getHostName();
                System.out.println("Using: " + chost + ":" + cport);
            }

            modCluster.start();

            // Create the proxy and mgmt handler
            final HttpHandler proxy = modCluster.getProxyHandler();
            final MCMPConfig config = MCMPConfig.webBuilder()
                    .setManagementHost(chost)
                    .setManagementPort(cport)
                    .enableAdvertise()
                    .getParent()
                    .build();

            final HttpHandler mcmp = config.create(modCluster, proxy);

            server = Undertow.builder()
                    .addHttpListener(cport, chost)
                    .addHttpListener(pport, phost)
                    .setHandler(mcmp)
                    .build();
            server.start();

            // Start advertising the mcmp handler
            modCluster.advertise(config);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of io.undertow.server.handlers.proxy.mod_cluster.ModCluster

    public static void main(final String[] args) throws IOException {
        final XnioWorker worker = Xnio.getInstance().createWorker(OptionMap.EMPTY);
        final Undertow server;

        final ModCluster modCluster = ModCluster.builder(worker).build();
        try {
            if (chost == null) {
                // We are going to guess it.
                chost = java.net.InetAddress.getLocalHost().getHostName();
                System.out.println("Using: " + chost + ":" + cport);
            }

            modCluster.start();

            // Create the proxy and mgmt handler
            final HttpHandler proxy = modCluster.getProxyHandler();
            final MCMPConfig config = MCMPConfig.webBuilder()
                    .setManagementHost(chost)
                    .setManagementPort(cport)
                    .enableAdvertise()
                    .getParent()
                    .build();

            final HttpHandler mcmp = config.create(modCluster, proxy);

            server = Undertow.builder()
                    .addHttpListener(cport, chost)
                    .addHttpListener(pport, phost)
                    .setHandler(mcmp)
                    .build();
            server.start();

            // Start advertising the mcmp handler
            modCluster.advertise(config);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.modcluster.model.Modcluster

                }
                else
                {
                    ModelNode payload = response.get(RESULT).asObject();

                    Modcluster modcluster = adapter.fromDMR(payload);

                    if(payload.hasDefined("ssl") && payload.get("ssl").hasDefined("configuration"))
                    {
                        SSLConfig ssl = sslAdapter.fromDMR(payload.get("ssl").get("configuration").asObject());
                        modcluster.setSSLConfig(ssl);
                    }
                    else
                    {
                        // provide an empty entity
                        AutoBean<SSLConfig> autoBean = factory.SSLConfig();
                        autoBean.setTag("state", "transient");
                        modcluster.setSSLConfig(autoBean.as());
                    }

                    getView().updateFrom(modcluster);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.