public class PRO extends Object implements 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 Interceptor
s. 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 . |
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(Remote target, Remote source) throws RemoteException
connect
in interface PortableRemoteObjectDelegate
RemoteException
public void exportObject(Remote obj) throws RemoteException
exportObject
in interface PortableRemoteObjectDelegate
RemoteException
public Object narrow(Object narrowFrom, Class narrowTo)
narrow
in interface PortableRemoteObjectDelegate
public Remote toStub(Remote obj) throws NoSuchObjectException
toStub
in interface PortableRemoteObjectDelegate
NoSuchObjectException
public void unexportObject(Remote obj) throws NoSuchObjectException
unexportObject
in interface PortableRemoteObjectDelegate
NoSuchObjectException