Name
LocateRegistry
Synopsis
This is a low-level interface to an RMI registry service, residing
either on the local host or on remote servers. On lookups, the Naming
service parses the host and port from the remote object URL and uses
the LocateRegistry
interface to connect to the remote registry. The
various getRegistry()
methods provide the means to get a reference to
the local registry, or a stub to a remote registry running on a given
host and port. The createRegistry()
methods create a registry running
on the local host on the given port number. The second form of the
createRegistry()
method allows you to specify custom socket factories
to be used by the registry when it communicates with clients and
server objects.
public final class LocateRegistry { // No Constructor // Public Class Methods public static Registry createRegistry( int port) throws RemoteException; public static Registry createRegistry(int port, // 1.2 java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws RemoteException; public static Registry getRegistry( ) throws RemoteException; public static Registry getRegistry( int port) throws RemoteException; public static Registry getRegistry( String host) throws RemoteException; public static Registry getRegistry(String host, int port) throws RemoteException; public static Registry getRegistry(String host, int port, // 1.2 java.rmi.server.RMIClientSocketFactory csf) throws RemoteException; }
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.