Java Doc for Registry.java in  » 6.0-JDK-Core » rmi » java » rmi » registry » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » rmi » java.rmi.registry 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.rmi.registry.Registry

Registry
public interface Registry extends Remote(Code)
Registry is a remote interface to a simple remote object registry that provides methods for storing and retrieving remote object references bound with arbitrary string names. The bind, unbind, and rebind methods are used to alter the name bindings in the registry, and the lookup and list methods are used to query the current name bindings.

In its typical usage, a Registry enables RMI client bootstrapping: it provides a simple means for a client to obtain an initial reference to a remote object. Therefore, a registry's remote object implementation is typically exported with a well-known address, such as with a well-known java.rmi.server.ObjID.REGISTRY_ID ObjID and TCP port number (default is Registry.REGISTRY_PORT 1099 ).

The LocateRegistry class provides a programmatic API for constructing a bootstrap reference to a Registry at a remote address (see the static getRegistry methods) and for creating and exporting a Registry in the current VM on a particular local address (see the static createRegistry methods).

A Registry implementation may choose to restrict access to some or all of its methods (for example, methods that mutate the registry's bindings may be restricted to calls originating from the local host). If a Registry method chooses to deny access for a given invocation, its implementation may throw java.rmi.AccessException , which (because it extends java.rmi.RemoteException ) will be wrapped in a java.rmi.ServerException when caught by a remote client.

The names used for bindings in a Registry are pure strings, not parsed. A service which stores its remote reference in a Registry may wish to use a package name as a prefix in the name binding to reduce the likelihood of name collisions in the registry.
author:
   Ann Wollrath
author:
   Peter Jones
version:
   1.25, 07/05/05
since:
   JDK1.1
See Also:   LocateRegistry



Field Summary
final public static  intREGISTRY_PORT
     Well known port for registry.


Method Summary
public  voidbind(String name, Remote obj)
     Binds a remote reference to the specified name in this registry.
public  String[]list()
     Returns an array of the names bound in this registry.
public  Remotelookup(String name)
     Returns the remote reference bound to the specified name in this registry.
public  voidrebind(String name, Remote obj)
     Replaces the binding for the specified name in this registry with the supplied remote reference.
public  voidunbind(String name)
     Removes the binding for the specified name in this registry.

Field Detail
REGISTRY_PORT
final public static int REGISTRY_PORT(Code)
Well known port for registry.





Method Detail
bind
public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException(Code)
Binds a remote reference to the specified name in this registry.
Parameters:
  name - the name to associate with the remote reference
Parameters:
  obj - a reference to a remote object (usually a stub)
throws:
  AlreadyBoundException - if name is already bound
throws:
  RemoteException - if remote communication with theregistry failed; if exception is a ServerExceptioncontaining an AccessException, then the registrydenies the caller access to perform this operation (iforiginating from a non-local host, for example)
throws:
  AccessException - if this registry is local and it deniesthe caller access to perform this operation
throws:
  NullPointerException - if name isnull, or if obj is null



list
public String[] list() throws RemoteException, AccessException(Code)
Returns an array of the names bound in this registry. The array will contain a snapshot of the names bound in this registry at the time of the given invocation of this method. an array of the names bound in this registry
throws:
  RemoteException - if remote communication with theregistry failed; if exception is a ServerExceptioncontaining an AccessException, then the registrydenies the caller access to perform this operation
throws:
  AccessException - if this registry is local and it deniesthe caller access to perform this operation



lookup
public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException(Code)
Returns the remote reference bound to the specified name in this registry.
Parameters:
  name - the name for the remote reference to look up a reference to a remote object
throws:
  NotBoundException - if name is not currently bound
throws:
  RemoteException - if remote communication with theregistry failed; if exception is a ServerExceptioncontaining an AccessException, then the registrydenies the caller access to perform this operation
throws:
  AccessException - if this registry is local and it deniesthe caller access to perform this operation
throws:
  NullPointerException - if name is null



rebind
public void rebind(String name, Remote obj) throws RemoteException, AccessException(Code)
Replaces the binding for the specified name in this registry with the supplied remote reference. If there is an existing binding for the specified name, it is discarded.
Parameters:
  name - the name to associate with the remote reference
Parameters:
  obj - a reference to a remote object (usually a stub)
throws:
  RemoteException - if remote communication with theregistry failed; if exception is a ServerExceptioncontaining an AccessException, then the registrydenies the caller access to perform this operation (iforiginating from a non-local host, for example)
throws:
  AccessException - if this registry is local and it deniesthe caller access to perform this operation
throws:
  NullPointerException - if name isnull, or if obj is null



unbind
public void unbind(String name) throws RemoteException, NotBoundException, AccessException(Code)
Removes the binding for the specified name in this registry.
Parameters:
  name - the name of the binding to remove
throws:
  NotBoundException - if name is not currently bound
throws:
  RemoteException - if remote communication with theregistry failed; if exception is a ServerExceptioncontaining an AccessException, then the registrydenies the caller access to perform this operation (iforiginating from a non-local host, for example)
throws:
  AccessException - if this registry is local and it deniesthe caller access to perform this operation
throws:
  NullPointerException - if name is null



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.