static String phost = System.getProperty("io.undertow.examples.proxy.ADDRESS", "localhost");
static final int pport = Integer.parseInt(System.getProperty("io.undertow.examples.proxy.PORT", "8000"));
public static void main(final String[] args) {
Undertow server;
ModClusterContainer container = new ModClusterContainer();
try {
if (chost == null) {
// We are going to guess it.
chost = java.net.InetAddress.getLocalHost().getHostName();
System.out.println("Using: " + chost + ":" + cport);
}
container.start();
ProxyHandler proxy = new ProxyHandler(container.getProxyClient(), 30000, ResponseCodeHandler.HANDLE_404);
MCMPHandler.MCMPHandlerBuilder mcmpBuilder = MCMPHandler.builder();
mcmpBuilder.setManagementHost(chost);
mcmpBuilder.setManagementPort(cport);
MCMPHandler mcmp = mcmpBuilder.build(container, proxy);
mcmp.start();