Package javax.isolate

Examples of javax.isolate.Link.receive()


     */
    public static void main(String[] args) {
        Link cl = Isolate.getLinks()[0];
        CommandRunner cr;
        try {
            ObjectLinkMessage message = (ObjectLinkMessage) cl.receive();
            cr = (CommandRunner) message.extract();
            Map<String, String> env = cr.getEnv();
            int envSize = (env == null) ? 0 : env.size();
            byte[][] binEnv = new byte[envSize * 2][];
            if (envSize > 0) {
View Full Code Here


        try {
            Link link = newIsolate.newStatusLink();
            newIsolate.start();
            //wait for exit
            for (;;) {
                LinkMessage msg = link.receive();
                if (msg.containsStatus() && IsolateStatus.State.EXITED.equals(msg.extractStatus().getState()))
                    break;
            }
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    public static class ChildClass {

        public static void main(String[] args)
            throws ClosedLinkException, IllegalStateException, InterruptedIOException, IOException {
            Link link = Isolate.getLinks()[0];
            LinkMessage msg = link.receive();
            System.out.println("Got message: " + msg.extractString());
        }
    }
}
View Full Code Here

        }

        Link link = iso.newStatusLink();
        iso.exit(-1);
        while (true) {
            LinkMessage msg = link.receive();
            if (msg.containsStatus()) {
                IsolateStatus is = msg.extractStatus();
                if (is.getState().equals(IsolateStatus.State.EXITED)) {
                    out.println(str_done);
                    break;
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.