Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.rmi.registry
Class LocateRegistry

    java.lang.Object
      weblogic.rmi.registry.LocateRegistry

All Implemented Interfaces:
  Registry, Remote

    public final class LocateRegistry

extends Object
implements Registry

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

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

Field Summary

Fields inherited from interface java.rmi.registry.Registry
`REGISTRY_PORT`

Method Summary
`void` | `bind(String name, Remote o)` Binds a name to a remote object in the registry.
`static String` | `clearURL(weblogic.protocol.ServerURL url)`
`static Registry` | `createRegistry(int port)` Returns a WebLogic Server registry located on `localhost` at the specified port.
`static Registry` | `getRegistry()` Returns the WebLogic Server registry located on `localhost`.
`static Registry` | `getRegistry(int port)` Returns the WebLogic Server registry located on `localhost` at the specified port.
`static Registry` | `getRegistry(String name)` Returns the WebLogic Server registry located on the specified host.
`static Registry` | `getRegistry(String name, int port)` Returns the WebLogic Server registry located on the specified host and port.
`static weblogic.protocol.ServerURL` | `getServerURL(String name)`
`static String` | `getURL(weblogic.protocol.ServerURL url)`
`String[]` | `list()` Returns an array of names (URLs) currently bound into the WebLogic Server registry.
`Remote` | `lookup(String name)` Returns a remote object -- an initialized instance of a stub or the instance of a co-located object when the object is found in the `weblogic.rmi` name space.
`void` | `rebind(String name, Remote o)` Rebinds a name to a remote object.
`void` | `unbind(String name)` Unbinds a name from the registry.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### lookup

    public Remote lookup(String name)
                  throws RemoteException,
                         NotBoundException,
                         AccessException

  Returns a remote object -- an initialized instance of a stub or the instance of a co-located object when the object is found in the `weblogic.rmi` name space.

  Specified by:
    `lookup` in interface `Registry`
  Parameters:
    `name` - the name of remote object to locate.
  Returns:
    the remote object.
  Throws:
    `RemoteException` - if there is an error with the remote object.
    `AccessException` - if there is an error accessing the remote object.
    `NotBoundException` - if the specified name is not bound.

### bind

    public void bind(String name,
                     Remote o)
              throws RemoteException,
                     AlreadyBoundException,
                     AccessException

  Binds a name to a remote object in the registry.

  The name may be a full URL that follows conventional RMI naming procedures or a name for the object itself. Use the following naming convention within the Weblogic registry:

        t3://localhost:7001/nameForRemoteObject

  where `t3://localhost:7001` is the default URL.

  Specified by:
    `bind` in interface `Registry`
  Parameters:
    `name` - the name for the Remote object.
    `impl` - the remote object.
  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 accessing the remote object.

### unbind

    public void unbind(String name)
                throws RemoteException,
                       NotBoundException,
                       AccessException

  Unbinds a name from the registry.

  The name may be a full URL that follows conventional RMI naming procedures or a name for the object itself. Use the following naming convention within the Weblogic registry:

        t3://localhost:7001/nameForRemoteObject

  where `t3://localhost:7001` is the default URL.

  Specified by:
    `unbind` in interface `Registry`
  Parameters:
    `name` - the name for the Remote object.
  Throws:
    `RemoteException` - if there is an error with the Remote object.
    `AccessException` - if there is an error accessing the Remote object.
    `NotBoundException` - if the specified name is not bound.

### rebind

    public void rebind(String name,
                       Remote o)
                throws RemoteException,
                       AccessException

  Rebinds a name to a remote object. If the name is already bound to another Remote object, the binding is removed before binding to the new remote object.

  The name may be a full URL that follows conventional RMI naming procedures or a name for the object itself. Use the following naming convention within the Weblogic registry:

        t3://localhost:7001/nameForRemoteObject

  where `t3://localhost:7001` is the default URL.

  Specified by:
    `rebind` in interface `Registry`
  Parameters:
    `name` - the name for the remote object.
    `obj` - the remote object.
  Throws:
    `RemoteException` - if there is an error with the remote object.
    `AccessException` - if there is an error accessing the remote object.

### list

    public String[] list()
                  throws RemoteException,
                         AccessException

  Returns an array of names (URLs) currently bound into the WebLogic Server registry.

  Specified by:
    `list` in interface `Registry`
  Parameters:
    `name` - the URL of the registry.
  Returns:
    an array of URLs bound in the registry.
  Throws:
    `RemoteException` - if there is an error with the remote object.
    `AccessException` - if there is an error accessing the remote object.

### getRegistry

    public static Registry getRegistry()
                                throws RemoteException

  Returns the WebLogic Server registry located on `localhost`. Provides compatibility with the `java.rmi.*` package.

  Returns:
    the registry.
  Throws:
    `RemoteException` - if there is an error with the remote object.

### getRegistry

    public static Registry getRegistry(int port)
                                throws RemoteException

  Returns the WebLogic Server registry located on `localhost` at the specified port. Provides compatibility with the `java.rmi.*` package.

  Parameters:
    `port` - the port at which WebLogic registry is located.
  Returns:
    the registry.
  Throws:
    `RemoteException` - if there is an error with the remote object.

### getRegistry

    public static Registry getRegistry(String name)
                                throws RemoteException,
                                       UnknownHostException

  Returns the WebLogic Server registry located on the specified host. Provides compatibility with the `java.rmi.*` package.

  Parameters:
    `name` - the host where the registry is located.
  Returns:
    the 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(String name,
                                       int port)
                                throws RemoteException,
                                       UnknownHostException

  Returns the WebLogic Server registry located on the specified host and port. Provides compatibility with the `java.rmi.*` package.

  Parameters:
    `name` - the name of host where the registry is located.
    `port` - the port where the registry is located.
  Returns:
    the 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

  Returns a WebLogic Server registry located on `localhost` at the specified port. Provides compatibility with the `java.rmi.*` package.

  Parameters:
    `port` - the port where the registry is located.
  Returns:
    the registry.
  Throws:
    `RemoteException` - if there is an error with the remote object.

### getURL

    public static String getURL(weblogic.protocol.ServerURL url)

### clearURL

    public static String clearURL(weblogic.protocol.ServerURL url)
                           throws MalformedURLException

  Throws:
    `MalformedURLException`

### getServerURL

    public static weblogic.protocol.ServerURL getServerURL(String name)
                                                    throws MalformedURLException

  Throws:
    `MalformedURLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD