dcsimg
Stub and class file
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mahjoub_Langar
Posted On:   Tuesday, May 15, 2001 08:27 AM

Say I take some class file: how can I know if it is a stub or a plain class file? Do not tell me by file name. I need a technical answer that is made on the basis of the content of the binary file.

Re: Stub and class file

Posted By:   Luigi_Viggiano  
Posted On:   Monday, May 28, 2001 05:38 AM

A stub is just a dummy implementation of a remote object interface delegating the real job using network.
To understand if a class is a businness object or just a stub you have to check its source code and understand its behaviour. If it does businness jobs directly it's a plain class, otherwise, if it just acts like an intermediate to the network layer it's a stub.

For RMI, at runtime you can check if the class is instance of java.rmi.server.RemoteStub, if yes it's a stub, otherwise is a plain class.

Re: Stub and class file

Posted By:   Anthony_Arobone  
Posted On:   Tuesday, May 22, 2001 11:05 PM

Well, a stub is a plain class file. It is just not implementated with the code from the orignal class that it was generated from, instead its implementation is serializing classes, making connections and streaming data. So to answer your question...I don't there is a way you can tell just by looking at the class files. But, I could be mistaken.
About | Sitemap | Contact