Registry Protocol
The registry
protocol handler provides support accessing
a remote object published within an RMI registry using a URI in the
form registry[:<host>[:<port>]]:<path>.
Specification
The specification of the registry protocol is as follows;
registry[:<host>[:<port>]]:<path>
host | The RMI registry host. |
port | The assigned port. Defaults to 1099. |
path | The name under which the object is published. |
Using an registry URL
Using registry URLs are no different from any http or ftp URLs. You
create them by instantiating the java.net.URL
class,
and setting the protocol to "registry" (no quotes).
The following example registry URI identifies a object named "dpml/station".
registry:dpml/station
The following code demonstrates the resolution of the object.
URI uri = new URI( "registry:dpml/station" ); Station station = (Station) uri.toURL().getContent( new Class[]{Station.class} );