Re: Bootstrap stubs with fixed UUIDs
Esmond Pitt <[email protected]> Tue, 17 Mar 2009 16:35:36 -0600
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Thanks Peter. So assuming my remote interface is RemoteSubject, it would =
go
something like this?
=09Class<?>[] intfs =3D {
=09=09// fill in the remote interface(s) to be implemented
=09=09RemoteMethodControl.class,
=09=09RemoteSubject.class
=09};
=09// Build a bootstrap stub
=09Endpoint=09ep =3D SslEndpoint.getInstance("localhost", RemoteSubject.P=
ORT);
=09ObjectEndpoint=09oe =3D new BasicObjectEndpoint(ep, RemoteSubject.UUID=
, true);
=09InvocationHandler=09ih =3D new BasicInvocationHandler(oe, clientConstr=
aints);
=09Remote proxy =3D
(Remote)Proxy.newProxyInstance(RemoteMethodControl.class.getClassLoader()=
,
intfs, ih);
=09RemoteSubject=09rs =3D (RemoteSubject)pp.prepareProxy(proxy);
Seems to work.
TIA
EJP
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to [email protected]