|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagejava.rmi.registry
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
LocateRegistry
is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host) or to create a remote object registry that accepts calls on a specific port.Note that a
getRegistry
call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore a subsequent method invocation to a remote registry returned as a result of this method may fail. @version 1.22 0229 12/0203/0001 @author Ann Wollrath @author Peter Jones @since JDK1.1 @see java.rmi.registry.Registry
Class Registry, void bind(String, Remote)For obtainingRegistry
references tois a remoteobjects RMIinterfaceprovidesto a simple remote object registryinterface implemented by RMI's rmiregistrythat provides methods for storing and retrieving remote object references bound with arbitrary string names. The
java.rmi.Namingbindclassunbind
providesandrebind
methods are used toaccess a remotealter the nameobjectbindings in the registryusingandURL-formattedthenameslookup
andlist
methods are used tospecifyqueryinthe current name bindings.In its typical usage a
compactRegistry
format both theenables RMI clientremotebootstrapping:registry along with the nameit provides a simple means forthea client to obtain an initial reference to a remote object.TypicallyTherefore a"registry"'sexists on every node that allows RMI connectionsremote object implementation is typically exported with atowell-knownservers on thataddress such asnode.withAaregistrywell-knownonObjIDaandparticularTCP port number (default isnode1099})The LocateRegistry class
containsprovides atransientprogrammaticdatabase that maps namesAPI for constructing a bootstrap reference toremoteaobjects.Registry
Whenat aregistryremotestartsaddressup(see theregistrystaticdatabasegetRegistry
ismethods)empty.andThefornamescreating andstoredexporting aRegistry
in theregistry are pure and are notcurrent VM on a particular localparsedaddress (see the staticcreateRegistry
methods).A
serviceRegistry
storing itselfimplementation mayinchoose to restrict access to some or all of its methods (for example methods that mutate the registry's bindings maywant to prefix its name ofbe restricted to calls originating from theservicelocalbyhost). If apackageRegistry
namemethod(althoughchoosesnottorequired)denyto reduce name collisions in theaccess for a given invocation itsregistryimplementation may throw java.rmi.AccessExceptionTowhichcreate(becausea registryit extendsthatwil berunswrapped inanaapplicationjava.rmi.ServerExceptionuse one of thewhen caught by aLocateRegistryremote client.createRegistryThe names used for bindings in a
Registry
methodsare pure strings not parsed.To obtain aA service which stores its remote referencetoin aremoteRegistry
object registrymay wish to useonea packageofname as a prefix in theLocateRegistry.getRegistrynamemethods.binding@versionto1.13reduce02/02/00the likelihood of name collisions in the registry. @author Ann Wollrath @sinceauthorJDK1.1Peter Jones @see javaversion 1.rmi16 01/12/03 @since JDK1.Naming1 @seejava.rmi.registry.LocateRegistry
Binds a remote reference to the specifiedClass Registry, String[] list()name
to ainremote objectthis registry. @param namea URL-formattedthe nameforto associate with the remoteobjectreference @param obj a referencefortothea remote object (usually a stub) @exceptionthrows AlreadyBoundException ifname
is already bound @exception MalformedURLExceptionthrows RemoteException ifthe nameremoteis not an appropriatelycommunication with the registryformattedfailed;URLif@exceptionRemoteException ifis aregistryServerException
could notcontaining anbeAccessException
contactedthen@exceptiontheAccessException if this operation isregistry denies the caller accessnotto perform thispermittedoperation (if originating from a non-local host for example) @sincethrowsJDK1.1AccessException if this registry is local and it denies the caller access to perform this operation @throws NullPointerException ifname
isnull
or ifobj
isnull
Returns an array of the names bound inClass Registry, Remote lookup(String)thethis registry. Thenames are URL-formatted strings. Thearraycontainswill contain a snapshot of the namespresentbound inthethis registry at the time of thecallgiven invocation of this method. @return an array of the names(bound inthethis registryappropriate@throwsURLRemoteExceptionformat)ifboundremoteincommunication with the registry@failed; if exceptionRemoteExceptionisifaServerException
containing anAccessException
then the registrycoulddenies the callernot be contactedaccess to perform this operation @exceptionthrows AccessException if thisoperationregistry isnot permittedlocal(ifandoriginating from ait denies thenon-localcallerhost foraccess toexample)perform@sincethisJDK1.1operation
ReturnsClass Registry, void rebind(String, Remote)a reference a stub forthe remoteobject associated withreference bound to the specifiedname
in this registry. @param namea URL-formattedthe name for the remoteobjectreference to look up @return a referenceforto a remote object @exceptionthrows NotBoundException ifname
is not currently bound @exceptionthrows RemoteException if remote communication with the registrycouldfailed;notif exception is aServerException
containing anAccessException
then the registry denies the caller accessbe contactedto perform this operation @exceptionthrows AccessException if thisoperationregistry isnot permittedlocal and(ifitoriginating from adenies the callernon-localaccesshosttoforperform thisexample)operation @sincethrowsJDK1.1NullPointerException ifname
isnull
Class Registry, void unbind(String)RebindsReplaces the binding for the specifiedname
toinathis registry with thenewsupplied remoteobjectreference.AnyIf there is an existing binding for the specifiedname it is
replaceddiscarded. @param namea URL-formattedthe nameassociatedto associate with the remoteobjectreference @param objnew remoteaobjectreference toassociateawith theremote objectname(usually a stub) @exception MalformedURLExceptionthrows RemoteException ifthe nameremoteis not an appropriatelycommunication with the registryformattedfailed;URLif@exceptionRemoteException ifis aregistryServerException
could notcontaining anbeAccessException
contactedthen@exceptiontheAccessException if this operationregistry denies the callerisaccess tonotperformpermittedthis operation (if originating from a non-local host for example) @sincethrowsJDK1.1AccessException if this registry is local and it denies the caller access to perform this operation @throws NullPointerException ifname
isnull
or ifobj
isnull
DestroysRemoves the binding for the specifiedname
thatinis associated with a remotethisobjectregistry. @param namea URL-formattedthe nameassociated with a remote objectof the binding to remove @exceptionthrows NotBoundException ifname
is not currently bound @exception MalformedURLExceptionthrows RemoteException ifthe nameremoteis not an appropriatelycommunication with the registryformattedfailed;URLif@exceptionRemoteException ifis aregistryServerException
could notcontaining anbeAccessException
contactedthen@exceptiontheAccessException if this operation isregistry denies the caller accessnotto perform thispermittedoperation (if originating from a non-local host for example) @sincethrowsJDK1.1AccessException if this registry is local and it denies the caller access to perform this operation @throws NullPointerException ifname
isnull
RegistryHandler
is an interface used internally by the RMI runtime in previous implementation versions. It should never be accessed by application code. @version 1.10 0211 12/0203/0001 @author Ann Wollrath @since JDK1.1 @deprecated no replacement