Package java.rmi.registry

Examples of java.rmi.registry.Registry.lookup()


  public static EagleManager getManager(String host, int port, String password) throws RemoteException, NotBoundException {

    Registry registry = LocateRegistry.getRegistry(host,port);

    EagleLogin eagleLogin = (EagleLogin) registry.lookup("eagleLogin");

    return eagleLogin.login(password);
  }

View Full Code Here


        String processManagerName = args[3];

        Registry reg = LocateRegistry.getRegistry(registryHost, registryPort);

        final ProcessAgentImpl agent = new ProcessAgentImpl();
        ProcessManagerRemoteIF manager = (ProcessManagerRemoteIF) reg.lookup(processManagerName);
        agent.init(agentName,manager);
    }

    private void waitForShutdown() {
        try {
View Full Code Here

                    }
                }
        });
        Runtime.getRuntime().addShutdownHook(agent.shutdownHook);

        ProcessManagerRemoteIF manager = (ProcessManagerRemoteIF) reg.lookup(processManagerName);
        agent.init(agentName,manager);

        agent.waitForShutdown();
        agent.notifyManagerOnExit();
        if(agent.exitedFromParent) {
View Full Code Here

     * @param hostName
     * @throws Exception
     */
    public static void disableHost(String hostName) throws Exception {
        Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
        com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);

        impl.disableHost(hostName);
    }

    /**
 
View Full Code Here

     * @param hostName
     * @throws Exception
     */
    public static void removeHost(String hostName) throws Exception {
        Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
        com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);

        impl.removeHost(hostName);
    }

    /**
 
View Full Code Here

     * @return
     * @throws Exception
     */
    public static boolean exists(String hostName) throws Exception {
        Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
        com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);

        return impl.exists(hostName);
    }

    /**
 
View Full Code Here

     * @return
     * @throws Exception
     */
    public static boolean isEnabled(String hostName) throws Exception {
        Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
        com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);

        return impl.isEnabled(hostName);
    }

    /**
 
View Full Code Here

     * @throws Exception
     */
    public static boolean isAvailable() throws Exception {
        try {
            Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
            com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
View Full Code Here

    log.entering ("com.sun.grid.jgrid.server.JCEPHandler", "connectToResultChannel");
   
    Registry r = LocateRegistry.getRegistry (registryHost, registryPort);
   
    try {
      resultChannel = (ResultChannel)r.lookup (ResultChannel.LOOKUP_NAME);
    }
    catch (NotBoundException e) {
      log.throwing ("com.sun.grid.jgrid.server.JCEPHandler", "connectToResultChannel", e);
     
      throw new RemoteException ("Unable to bind to result channel", e);
View Full Code Here

   */ 
  private void connectToResultChannel (String resultHost) throws RemoteException {
    Registry r = LocateRegistry.getRegistry(resultHost, ResultChannel.PORT);
   
    try {
      resultChannel = (ResultChannel)r.lookup(ResultChannel.LOOKUP_NAME);
    }
    catch (NotBoundException e) {
      throw new RemoteException("Unable to bind to result channel");
    }
  }
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.