Package java.rmi.registry

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


    public void init() throws RemoteException {
        if (registry == null && locate) {
            try {
                Registry reg = LocateRegistry.getRegistry(getPort());
                reg.list();
                registry = reg;
            } catch (RemoteException e) {
                // ignore
            }
        }
View Full Code Here


            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, true);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        String[] names = reg.list();
        String regName = "//" + ((url.host == null) ? "" : url.host) + ":" + url.port + "/"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

        for (int i = 0; i < names.length; ++i) {
            names[i] = regName + names[i];
        }
View Full Code Here

    public Hashtable probeRegistry(int port) throws RemoteException,
            NotBoundException {
        Hashtable table = new Hashtable();
        Registry r = LocateRegistry.getRegistry(port);
        String s[] = r.list();

        for (int i = 0; i < s.length; i++) {
            Remote robj = r.lookup(s[i]);
            Class cl = robj.getClass();
            Field f[] = cl.getDeclaredFields();
View Full Code Here

                // we're in a web-app being 'hot' re-depoloyed, then the JVM
                // still
                // has the registry that we created above the first time...
                registry = LocateRegistry.getRegistry(resources
                        .getRMIRegistryPort());
                registry.list();
            } catch (Exception e) {
                registry = LocateRegistry.createRegistry(resources
                        .getRMIRegistryPort());
            }
        } else if (resources.getRMICreateRegistryStrategy().equals(
View Full Code Here

        try {
            registry = rmiRegistries.get(Integer.toString(port));
            if (registry == null) {
                try {
                    registry = LocateRegistry.getRegistry(port);
                    registry.list();
                } catch (RemoteException e) {
                    registry = LocateRegistry.createRegistry(port);
                }
                rmiRegistries.put(Integer.toString(port), registry);
            }
View Full Code Here

    public void afterPropertiesSet() throws RemoteException {
        if (registry == null && locate) {
            try {
                Registry reg = LocateRegistry.getRegistry(getPort());
                reg.list();
                registry = reg;
            } catch (RemoteException e) {
                // ignore
            }
        }
View Full Code Here

        Registry registry = LocateRegistry.getRegistry(registryPort);

        // before we stop the context the registry is still exported, so list() should work
        Exception e;
        try {
            registry.list();
            e = null;
        } catch (NoSuchObjectException nsoe) {
            e = nsoe;
        }
        assertNull(e);
View Full Code Here

        context.stop();

        // stopping the Camel context unexported the registry, so list() should fail
        Exception e2;
        try {
            registry.list();
            e2 = null;
        } catch (NoSuchObjectException nsoe) {
            e2 = nsoe;
        }
        assertNotNull(e2);
View Full Code Here

        try {
          //lookup the registry
          r = LocateRegistry.getRegistry(Integer
              .valueOf(rmiAdapterPort));
          //ensure we are not already registered with the registry
          for (String regName : r.list()) {
            if (regName.equals("red5")) {
              //unbind connector from rmi registry
              r.unbind("red5");
            }
          }
View Full Code Here

        System.setSecurityManager(new RMISecurityManager());
      }
      // lookup the registry
      r = LocateRegistry.getRegistry(rmiPort);
      // ensure we are not already registered with the registry
      for (String regName : r.list()) {
        logger.debug("Registry entry: " + regName);
      }
    } catch (RemoteException re) {
      logger.info("RMI Registry server was not found on port " + rmiPort);
      // if we didnt find the registry and the user wants it created
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.