Package net.reversehttp.messaging

Examples of net.reversehttp.messaging.ServiceContainer


            String hostAndPort = (args.length > 1) ? args[1]
                    : "localhost.lshift.net:8000";
            URL serverUrl = new URL("http://" + hostAndPort + "/reversehttp");
            String label = "javasub" + new Random().nextInt(100000);
            String containerDomain = label + "." + hostAndPort;
            ServiceContainer container = new ServiceContainer(containerDomain);
            Address targetAddress = new Address("queue", containerDomain);
            container.bindName(targetAddress, new Sub(targetAddress, Address
                    .parse(sourceStr)));
            HttpServer httpd = new ReverseHttpServer(label, serverUrl,
                    container);
            httpd.serve();
        } catch (Exception e) {
View Full Code Here


            String ownAddressStr = (args.length > 1) ? args[1]
                    : "queue@localhost.lshift.net:8001";
            int port = (args.length > 2) ? Integer.parseInt(args[2]) : 8001;
            Address ownAddress = Address.parse(ownAddressStr);

            ServiceContainer container = new ServiceContainer(ownAddress
                    .getDomain());
            container.bindName(ownAddress, new Sub(ownAddress, Address
                    .parse(sourceStr)));
            HttpServer httpd = new NormalHttpServer(port, container);
            httpd.serve();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of net.reversehttp.messaging.ServiceContainer

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.