Package compute

Examples of compute.Compute


            String name = "Compute";
            System.out.println("Locate and initialize the registry");
            Registry registry = LocateRegistry.getRegistry();

            System.out.println("Lookup name " + name + " in the registry");
            Compute comp = (Compute) registry.lookup(name);

            System.out.println("Creating a new Pi task to be executed by the server");
            Pi task = new Pi(Integer.parseInt(args[1]));

            System.out.println("Sending task to server");
            BigDecimal pi = comp.executeTask(task);
            System.out.println("Result returned from the server: " + pi);
        } catch (Exception e) {
            System.err.println("ComputePi exception:");
            e.printStackTrace();
        }
View Full Code Here


      System.setSecurityManager(new SecurityManager());
    }

        try {
            String name = "Compute";
            Compute engine = new ComputeEngine();
            System.out.println("Creating stub");
            Compute stub =
                (Compute) UnicastRemoteObject.exportObject(engine, 0);
            System.out.println("Locate registry");
            Registry registry = LocateRegistry.getRegistry();
            System.out.println("Bind stub to registry");
            registry.rebind(name, stub);
View Full Code Here

TOP

Related Classes of compute.Compute

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.