dcsimg
Sharing object using the shareable interface
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jonas_Nilsson
Posted On:   Thursday, February 7, 2002 01:10 AM

I'm working on a key server client applet on a Java Card, and have a question.


The server applet has admin rights and is reponsible for creating keys, i.e. the server creates all key objects. The client applets will only have access, via the shareable interface, to the verify methods of the key objects.


My question is: Is it possible to get a shareable interface to an already created object, in this case multiple key objects created by the server applet?


Thank alot.

Jonas Nilsson

Re: Sharing object using the shareable interface

Posted By:   Julien_SIMON  
Posted On:   Friday, February 8, 2002 12:13 AM

Hi Jonas,


an object instance may only be shared if its class implements the Shareable interface.


If that's the case for your keys, you'll have no problem exporting a reference from the server to the client. It doesn't matter when the object is created, i.e. either in the applet constructor or later during the applet's life.


What is NOT possible is returning a reference to an instance of a non-shareable class : everything has to be laid out when you design the applet. In other words, you can't improvise object sharing !


Cheers,


Julien

About | Sitemap | Contact