|
RMI Proxy 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.rmiproxy.ProxyNaming
The main access point to the RMI application firewall.
ProxyNaming is the only interface clients and servers need to use.
For RMI servers, the RMI Proxy provides:
For RMI clients, the RMI Proxy supercedes the inferior HTTP tunnelling technique, providing:
The API implemented by ProxyNaming is identical to that of
java.rmi.Naming.
When an RMI server behind a firewall is bound to a registry,
ProxyNaming.bind or rebind should be used
instead of java.rmi.Naming.bind or rebind.
This propagates the binding to the server JVM's RMI Proxy Registry.
This proxy in turn may have another, more outer, proxy, specified by the value of
its rmi.proxyHost property;
if so, the propagation continues all the way to the outermost one at the final firewall
(i.e. the one which has no further proxy).
As a result, the server binding is now visible at the outermost RMI Proxy
(usually, to the Internet),
and can be accessed by clients, subject to the access control policies of the
RMI Proxies.
The bind/rebind action itself is also subject to the access control
policy of each proxy, so as to control the security of binding to remote registries -
this is not supported by java.rmi.Naming.
When an RMI client behind a firewall looks up an RMI registry URL, it should
use ProxyNaming.lookup instead of java.rmi.Naming.lookup.
This action delegates the lookup via all the client-side proxies,
specified by the value of their rmi.proxyHost property,
to the proxy at the final firewall
(i.e. the one which has no further proxy - usually, the one at the junction with the Internet).
Network administrators willing, this proxy is able to 'see' the server's outermost
proxy through both the remaining firewalls, and so a binding for the name can be found.
The rmi.proxyHost property is an RMI URL which names the RMI Proxy host and
port for the current JVM (similar to http.proxyHost and
http.proxyPort). It is always
the RMI Proxy which is closer to the Internet than this host.
The rmi.nonProxyHosts property is a list of hostnames that
ProxyNaming should contact directly, not via the proxy.
If the host being contacted appears in rmi.nonProxyHosts,
or if no value for rmi.proxyHost is set, ProxyNaming
behaves identically to java.rmi.Naming.
Notes:
ProxyNaming,
regardless of where the client is.
ProxyNaming,
regardless of where the server is.
NoSuchObjectException arising out of a premature unexport
due to a false DGC report. This is not a new issue in RMI design:
it can occur whenever "network partitions exist between client
and server" (RMI Specification, §3), because these make DGC unreliable. It is
likely to occur in configurations involving RMI Proxies because such configurations
almost always contain network partitions.
| Method Summary | |
static void |
bind(java.lang.String name,
java.rmi.Remote object)
Binds a name to a remote object. |
static java.lang.String[] |
list(java.lang.String name)
Lists the contents of a remote registry. |
static java.rmi.Remote |
lookup(java.lang.String name)
Looks up a remote item in a registry. |
static void |
rebind(java.lang.String name,
java.rmi.Remote object)
Rebinds a name to a new remote object, overriding any existing binding. |
static void |
unbind(java.lang.String name)
Unbinds a name from any association with a remote object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.lang.String[] list(java.lang.String name)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.net.MalformedURLException
name - RMI URL of the registry: rmi://host[:port].
Note that if the server is behind a firewall, the client must provide the
hostname/port number of the outermost server-side RMI proxy,
not the hostname/port number of the server itself.java.rmi.RemoteException - remote errorjava.rmi.AccessException - permission denied by RMI or firewalljava.net.MalformedURLException - bad registry URL
public static java.rmi.Remote lookup(java.lang.String name)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.rmi.NotBoundException,
java.net.MalformedURLException
name - RMI URL of the item: rmi://host[:port]/item.
Note that if the server is behind a firewall, the client must provide the
hostname/port number of the outermost server-side RMI proxy,
not the hostname/port number of the server itself.namejava.rmi.RemoteException - remote errorjava.rmi.AccessException - permission denied by RMI or firewalljava.rmi.NotBoundException - name not boundjava.net.MalformedURLException - bad item URL
public static void bind(java.lang.String name,
java.rmi.Remote object)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.rmi.AlreadyBoundException,
java.net.MalformedURLException
name - RMI URL of the item: rmi://host[:port]/itemobject - reference to the remote object to bindjava.rmi.RemoteException - remote errorjava.rmi.AccessException - permission denied by RMI or firewalljava.rmi.AlreadyBoundException - name already boundjava.net.MalformedURLException - bad item URL
public static void rebind(java.lang.String name,
java.rmi.Remote object)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.net.MalformedURLException
name - RMI URL of the item: rmi://host[:port]/itemobject - reference to the remote object to bindjava.rmi.RemoteException - remote errorjava.rmi.AccessException - permission denied by RMI or firewalljava.net.MalformedURLException - bad item URL
public static void unbind(java.lang.String name)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.rmi.NotBoundException,
java.net.MalformedURLException
name - RMI URL of the item: rmi://host[:port]/itemjava.rmi.RemoteException - remote errorjava.rmi.AccessException - permission denied by RMI or firewalljava.rmi.NotBoundException - name not boundjava.net.MalformedURLException - bad item URL
|
www.rmiproxy.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||