Java Platform 1.2
Beta 4

Class java.rmi.Naming

java.lang.Object
  |
  +--java.rmi.Naming

public final class Naming
extends Object
This is the bootstrap mechanism for obtaining references to remote objects based on Uniform Resource Locator (URL) syntax. The URL for a remote object is specified using the usual host, port and name:
rmi://host:port/name
host = host name of registry (defaults to current host)
port = port number of registry (defaults to the registry port number)
name = name for remote object


Method Summary
static void bind(String name, Remote obj)
          Binds the name to the specified remote object.
static String[] list(String name)
          Returns an array of strings of the URLs in the registry.
static Remote lookup(String name)
          Returns the remote object for the URL.
static void rebind(String name, Remote obj)
          Rebind the name to a new object; replaces any existing binding.
static void unbind(String name)
          Unbind the name.
 
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

Method Detail

lookup

public static Remote lookup(String name)
                     throws NotBoundException,
                            MalformedURLException,
                            UnknownHostException,
                            RemoteException
Returns the remote object for the URL.
Throws:
RemoteException - If registry could not be contacted.
NotBoundException - If name is not currently bound.

bind

public static void bind(String name,
                        Remote obj)
                 throws AlreadyBoundException,
                        MalformedURLException,
                        UnknownHostException,
                        RemoteException
Binds the name to the specified remote object.
Throws:
RemoteException - If registry could not be contacted.
AlreadyBoundException - If name is already bound.

unbind

public static void unbind(String name)
                   throws RemoteException,
                          NotBoundException,
                          MalformedURLException,
                          UnknownHostException
Unbind the name.
Throws:
RemoteException - If registry could not be contacted.
NotBoundException - If name is not currently bound.

rebind

public static void rebind(String name,
                          Remote obj)
                   throws RemoteException,
                          MalformedURLException,
                          UnknownHostException
Rebind the name to a new object; replaces any existing binding.
Throws:
RemoteException - If registry could not be contacted.

list

public static String[] list(String name)
                     throws RemoteException,
                            MalformedURLException,
                            UnknownHostException
Returns an array of strings of the URLs in the registry. The array contains a snapshot of the names present in the registry.
Throws:
RemoteException - If registry could not be contacted.

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.