当前页面: 
在线文档首页 > 
JDK 5 Documentation v1.1.8, Java 2 SDK 英文文档
Interface java.rmi.registry.Registry - JDK 5 Documentation v1.1.8, Java 2 SDK 英文文档
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Interface java.rmi.registry.Registry
  -  public interface Registry
  -  extends Remote
A "registry" exists on every node that allows RMI connections to
 servers on that node.  The registry on a particular node contains a
 transient database that maps names to remote objects.  When the
 node boots, the registry database is empty.  The names stored in the
 registry are pure and are not parsed.  A service storing itself in
 the registry may want to prefix its name of the service by a package
 name (although not required), to reduce name collisions in the
 registry.
 The LocateRegistry class is used to obtain the registry for different hosts.
    -  See Also:
    
-  LocateRegistry
   
  -   REGISTRY_PORT REGISTRY_PORT
-  Well known port for registry
   
  -   bind(String, Remote) bind(String, Remote)
-   Binds the name to the specified remote object.
  
-   list() list()
-   Returns an array of the names in the registry.
  
-   lookup(String) lookup(String)
-   Returns the remote object associated with the specified name in the 
 registry.
  
-   rebind(String, Remote) rebind(String, Remote)
-  
 Rebind the name to a new object, replacing any existing binding.
  
-   unbind(String) unbind(String)
-   Unbind the name.
   
 REGISTRY_PORT
REGISTRY_PORT
 public static final int REGISTRY_PORT
  -  Well known port for registry
 
   
 lookup
lookup
 public abstract Remote lookup(String name) throws RemoteException, NotBoundException, AccessException
  -  Returns the remote object associated with the specified name in the 
 registry.
   
- 
    -  Throws: RemoteException
    
-  If remote operation failed.
    
-  Throws: NotBoundException
    
-  if there is no object with this name in the
              registry.
    
-  Throws: AccessException
    
-  If this operation is not permitted.
  
 
 bind
bind
 public abstract void bind(String name,
                           Remote obj) throws RemoteException, AlreadyBoundException, AccessException
  -  Binds the name to the specified remote object.
   
- 
    -  Throws: RemoteException
    
-  If remote operation failed.
    
-  Throws: AlreadyBoundException
    
-  If name is already bound.
    
-  Throws: AccessException
    
-  If this operation is not permitted.
  
 
 unbind
unbind
 public abstract void unbind(String name) throws RemoteException, NotBoundException, AccessException
  -  Unbind the name.
   
- 
    -  Throws: RemoteException
    
-  If remote operation failed.
    
-  Throws: NotBoundException
    
-  if there is no object with this name in the
              registry.
    
-  Throws: AccessException
    
-  If this operation is not permitted.
  
 
 rebind
rebind
 public abstract void rebind(String name,
                             Remote obj) throws RemoteException, AccessException
  -  Rebind the name to a new object, replacing any existing binding.
   
- 
    -  Throws: RemoteException
    
-  If remote operation failed.
    
-  Throws: AccessException
    
-  If this operation is not permitted.
  
 
 list
list
 public abstract String[] list() throws RemoteException, AccessException
  -  Returns an array of the names in the registry.
   
- 
    -  Throws: RemoteException
    
-  If remote operation failed.
    
-  Throws: AccessException
    
-  If this operation is not permitted.
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
Submit a bug or feature - Version 1.1.8 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.
Copyright 1995-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.