BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.rmi.registry
Class LocateRegistry

java.lang.Object
  |
  +--weblogic.rmi.registry.LocateRegistry

public final class LocateRegistry
extends java.lang.Object
implements Registry

This class is provided for compatibility with the java.rmi.* package.

The registry that is returned is a colocated object that invokes methods on the server-side, JNDI implementation.

Author:
Copyright (c) 1997 by WebLogic, Inc. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void bind(java.lang.String name, Remote o)
          Binds a name to a Remote object in the registry, unless the name is already bound in the registry.
static Registry createRegistry(int port)
          This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost" at the specified port
static Registry getRegistry()
          This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost".
static Registry getRegistry(int port)
          This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost" at the specified port.
static Registry getRegistry(java.lang.String name)
          This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on the specified host.
static Registry getRegistry(java.lang.String name, int port)
          This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on the specified host and port.
 java.lang.String[] list()
          Returns an array of names (URLs) currently bound into the Tengah registry.
 Remote lookup(java.lang.String name)
          Returns a Remote object (an initialized instance of a stub or the instance of a colocated object), if the object is found in the weblogic.rmi name space.
 void rebind(java.lang.String name, Remote o)
          Rebinds a name to a Remote object.
 void unbind(java.lang.String name)
          Unbinds a name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public Remote lookup(java.lang.String name)
              throws RemoteException,
                     NotBoundException,
                     AccessException
Returns a Remote object (an initialized instance of a stub or the instance of a colocated object), if the object is found in the weblogic.rmi name space.
Specified by:
lookup in interface Registry

Parameters:
name - Name of remote object to locate
Returns:
Remote object
Throws:
RemoteException - if there is an error with the Remote object
AccessException - if there is an error with the Remote object
NotBoundException - if the specified name is not bound

bind

public void bind(java.lang.String name,
                 Remote o)
          throws RemoteException,
                 AlreadyBoundException,
                 AccessException
Binds a name to a Remote object in the registry, unless the name is already bound in the registry.

"Name" may be a full URL that follows conventional RMI naming procedures or a name for the object itself. The name you provide is regularized for use within the Tengah registry, following the general pattern:

  t3://localhost:7001/nameForRemoteObject
where "t3://localhost:7001" is used as a default URL.
Specified by:
bind in interface Registry

Parameters:
name - Name for the Remote object
impl - Remote object to be named
Throws:
RemoteException - if there is an error with the Remote object
AlreadyBoundException - if the name is already bound to another object
AccessException - if there is an error with the Remote object

unbind

public void unbind(java.lang.String name)
            throws RemoteException,
                   NotBoundException,
                   AccessException
Unbinds a name.

"Name" may be a full URL that follows conventional RMI naming procedures or a name for the object itself. The name you provide is regularized for use within the Tengah registry, following the general pattern:

  t3://localhost:7001/nameForRemoteObject
where "t3://localhost:7001" is used as a default URL.
Specified by:
unbind in interface Registry

Parameters:
name - Name for the Remote object
Throws:
RemoteException - if there is an error with the Remote object
AccessException - if there is an error with the Remote object
NotBoundException - if the specified name is not bound

rebind

public void rebind(java.lang.String name,
                   Remote o)
            throws RemoteException,
                   AccessException
Rebinds a name to a Remote object. If the name is already bound to another Remote object, first unbinds the existing relationship.

"Name" may be a full URL that follows conventional RMI naming procedures or a name for the object itself. The name you provide is regularized for use within the Tengah registry, following the general pattern:

  t3://localhost:7001/nameForRemoteObject
where "t3://localhost:7001" is used as a default URL.
Specified by:
rebind in interface Registry

Parameters:
name - Name for the Remote object
obj - Remote object to be named
Throws:
RemoteException - if there is an error with the Remote object
AccessException - if there is an error with the Remote object

list

public java.lang.String[] list()
                        throws RemoteException,
                               AccessException
Returns an array of names (URLs) currently bound into the Tengah registry.
Specified by:
list in interface Registry

Parameters:
name - URL of the Tengah Server registry
Returns:
Array of URLs bound in the registry
Throws:
RemoteException - if there is an error with the Remote object
AccessException - if there is an error with the Remote object

getRegistry

public static Registry getRegistry()
                            throws RemoteException
This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost".

Returns:
Registry
Throws:
RemoteException - if there is an error with the Remote object

getRegistry

public static Registry getRegistry(int port)
                            throws RemoteException
This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost" at the specified port.

Parameters:
port - Port at which Tengah registry is located
Returns:
Registry
Throws:
RemoteException - if there is an error with the Remote object

getRegistry

public static Registry getRegistry(java.lang.String name)
                            throws RemoteException,
                                   UnknownHostException
This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on the specified host.

Parameters:
name - Name of Tengah host
Returns:
Registry
Throws:
UnknownHostException - if the host specified by the URL is unknown
RemoteException - if there is an error with the Remote object

getRegistry

public static Registry getRegistry(java.lang.String name,
                                   int port)
                            throws RemoteException,
                                   UnknownHostException
This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on the specified host and port.

Parameters:
name - Name of Tengah host
port - Port at which Tengah registry is located
Returns:
Registry
Throws:
UnknownHostException - if the host specified by the URL is unknown
RemoteException - if there is an error with the Remote object

createRegistry

public static Registry createRegistry(int port)
                               throws RemoteException
This method, which is provided for compatibility with the java.rmi package, returns the Tengah registry located on "localhost" at the specified port

Parameters:
port - Port at which Tengah registry is located
Returns:
Registry
Throws:
RemoteException - if there is an error with the Remote object

Documentation is available at
http://www.weblogic.com/docs51