The default RegistryImpl exported restricts access to clients on the local host
for the methods bind, rebind, unbind by checking
the client host in the skeleton.
java.rmi.registry.LocateRegistry
| Modifier and Type | Field and Description |
|---|---|
| private static Hashtable | |
| private Hashtable | |
| private static ObjID | |
| private static RegistryImpl | |
| private static final String | REGISTRY_FILTER_PROPNAME
Property name of the RMI Registry serial filter to augment the built-in list of allowed types. |
| private static final int | REGISTRY_MAX_ARRAY_SIZE
Registry maximum array size in remote invocations. |
| private static final int | REGISTRY_MAX_DEPTH
Registry max depth of remote invocations. |
| private static final ObjectInputFilter | registryFilter
The registryFilter created from the value of the |
| private static ResourceBundle | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | RegistryImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Construct a new RegistryImpl on the specified port with the given custom socket factory pair. |
| public | RegistryImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, ObjectInputFilter serialFilter)
Construct a new RegistryImpl on the specified port with the given custom socket factory pair and ObjectInputFilter. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | bind(String name, Remote obj)
Implements java. Binds the name to the specified remote object. |
| public static void | |
| public static RegistryImpl | Returns: a RegistryImpl instanceport on which the rmiregistry accepts requests;
if 0, an implementation specific port is assigned regPort)Return a new RegistryImpl on the requested port and export it to serve registry requests. |
| public static ObjID | |
| private static String | |
| private static ObjectInputFilter | Returns: an ObjectInputFilter, or nullInitialize the registryFilter from the security properties or system property; if any |
| public String[] | list()
Implements java. Returns an enumeration of the names in the registry. |
| public Remote | lookup(String name)
Implements java. Returns the remote object for specified name in the registry. |
| public static void | |
| private static URL[] | |
| public void | rebind(String name, Remote obj)
Implements java. Rebind the name to a new object, replaces any existing binding. |
| private static ObjectInputFilter. | Returns: ObjectInputFilter. if allowed,
ObjectInputFilter. if rejected,
otherwise ObjectInputFilter.access to the class, array length, etc. filterInfoObjectInputFilter to filter Registry input objects. |
| private void | setup(UnicastServerRef uref)
References Deprecated
UnicastServerRef is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public void |
| allowedAccessCache | back to summary |
|---|---|
| private static Hashtable<InetAddress, InetAddress> allowedAccessCache | |
| bindings | back to summary |
|---|---|
| private Hashtable<String, Remote> bindings | |
| id | back to summary |
|---|---|
| private static ObjID id | |
| registry | back to summary |
|---|---|
| private static RegistryImpl registry | |
| REGISTRY_FILTER_PROPNAME | back to summary |
|---|---|
| private static final String REGISTRY_FILTER_PROPNAME Property name of the RMI Registry serial filter to augment
the built-in list of allowed types.
Setting the property in the | |
| REGISTRY_MAX_ARRAY_SIZE | back to summary |
|---|---|
| private static final int REGISTRY_MAX_ARRAY_SIZE Registry maximum array size in remote invocations. | |
| REGISTRY_MAX_DEPTH | back to summary |
|---|---|
| private static final int REGISTRY_MAX_DEPTH Registry max depth of remote invocations. | |
| registryFilter | back to summary |
|---|---|
| private static final ObjectInputFilter registryFilter The registryFilter created from the value of the | |
| resources | back to summary |
|---|---|
| private static ResourceBundle resources | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| RegistryImpl | back to summary |
|---|---|
| public RegistryImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException Construct a new RegistryImpl on the specified port with the given custom socket factory pair. | |
| RegistryImpl | back to summary |
|---|---|
| public RegistryImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, ObjectInputFilter serialFilter) throws RemoteException Construct a new RegistryImpl on the specified port with the given custom socket factory pair and ObjectInputFilter. | |
| RegistryImpl | back to summary |
|---|---|
| public RegistryImpl(int port) throws RemoteException Construct a new RegistryImpl on the specified port. | |
| bind | back to summary |
|---|---|
| public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException Implements java. Binds the name to the specified remote object.
| |
| checkAccess | back to summary |
|---|---|
| public static void checkAccess(String op) throws AccessException Check that the caller has access to perform indicated operation. The client must be on same the same host as this server. | |
| createRegistry | back to summary |
|---|---|
| public static RegistryImpl createRegistry(int regPort) throws RemoteException Return a new RegistryImpl on the requested port and export it to serve registry requests. A classloader is initialized from the system property "env.class.path" and a security manager is set unless one is already set. The returned Registry is fully functional within the current process and is usable for internal and testing purposes.
| |
| getID | back to summary |
|---|---|
| public static ObjID getID() | |
| getTextResource | back to summary |
|---|---|
| private static String getTextResource(String key) Retrieves text resources from the locale-specific properties file. | |
| initRegistryFilter | back to summary |
|---|---|
| private static ObjectInputFilter initRegistryFilter() Initialize the registryFilter from the security properties or system property; if any
| |
| list | back to summary |
|---|---|
| public String[] list() throws RemoteException Implements java. Returns an enumeration of the names in the registry.
| |
| lookup | back to summary |
|---|---|
| public Remote lookup(String name) throws RemoteException, NotBoundException Implements java. Returns the remote object for specified name in the registry.
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) Main program to start a registry. | |
| pathToURLs | back to summary |
|---|---|
| private static URL[] pathToURLs(String path) Convert class path specification into an array of file URLs. The path of the file is converted to a URI then into URL form so that reserved characters can safely appear in the path. | |
| rebind | back to summary |
|---|---|
| public void rebind(String name, Remote obj) throws RemoteException, AccessException Implements java. Rebind the name to a new object, replaces any existing binding.
| |
| registryFilter | back to summary |
|---|---|
| private static ObjectInputFilter. ObjectInputFilter to filter Registry input objects. The list of acceptable classes is limited to classes normally stored in a registry.
| |
| setup | back to summary |
|---|---|
| private void setup(UnicastServerRef uref) throws RemoteException
References Deprecated
See corresponding docs for further information. | |
| unbind | back to summary |
|---|---|
| public void unbind(String name) throws RemoteException, NotBoundException, AccessException Implements java. Unbind the name.
| |