public class PRO
extends java.lang.Object
implements javax.rmi.CORBA.PortableRemoteObjectDelegate
The PRO class implements the PortableRemoteObjectDelegate interfaced provided by the javax.rmi.CORBA package as a plugin point for RMI implementations.
In order to use this RMI implementation simply set the system
property javax.rmi.CORBA.PortableRemoteObjectClass to the name of
this class.
By default this class uses a Server instance on a random
port with no Interceptors. If this behavior needs to be
customized, this class may be subclassed by another class with a
noargs constructor that invokes the PRO(Server)
constructor with a Server instance that has been
initialized with the desired Interceptor implementations
and/or port. For example:
public class MyPRO extends PRO {
public MyPRO() {
super(new Server(new MyClientInterceptor(), new MyServerInterceptor()));
}
}
java -Djavax.rmi.CORBA.PortableRemoteObjectClass=MyPRO MyApp
Server.Server(ClientInterceptor, Interceptor),
Server.Server(int, ClientInterceptor, Interceptor)| Modifier | Constructor and Description |
|---|---|
|
PRO()
This is the public noargs constructor used by the RMI runtime
to create an instance of this class when it is used directly.
|
protected |
PRO(Server server)
Constructs a new PRO instance with the given
Server. |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.rmi.Remote target,
java.rmi.Remote source) |
void |
exportObject(java.rmi.Remote obj) |
java.lang.Object |
narrow(java.lang.Object narrowFrom,
java.lang.Class narrowTo) |
java.rmi.Remote |
toStub(java.rmi.Remote obj) |
void |
unexportObject(java.rmi.Remote obj) |
protected PRO(Server server)
Server.
This constructor is for use by subclasses wishing to use a
customized Server instance.server - the Server used by this PRO instancepublic PRO()
public void connect(java.rmi.Remote target,
java.rmi.Remote source)
throws java.rmi.RemoteException
connect in interface javax.rmi.CORBA.PortableRemoteObjectDelegatejava.rmi.RemoteExceptionpublic void exportObject(java.rmi.Remote obj)
throws java.rmi.RemoteException
exportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegatejava.rmi.RemoteExceptionpublic java.lang.Object narrow(java.lang.Object narrowFrom,
java.lang.Class narrowTo)
narrow in interface javax.rmi.CORBA.PortableRemoteObjectDelegatepublic java.rmi.Remote toStub(java.rmi.Remote obj)
throws java.rmi.NoSuchObjectException
toStub in interface javax.rmi.CORBA.PortableRemoteObjectDelegatejava.rmi.NoSuchObjectExceptionpublic void unexportObject(java.rmi.Remote obj)
throws java.rmi.NoSuchObjectException
unexportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegatejava.rmi.NoSuchObjectException