• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What does the stub and skeleton exactly contain?

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the stub and skeleton exactly contain?
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !!
Stubs and skeletons contain the method signatures of the remote objects.
Anyone would like to comment ?
Regards..
Leena
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Stub objects are surrogates that support exactly the same set of remote interfaces defined by the actual implementation of a remote object.
A skeleton is a server-side entity that dispatches calls to the actual remote object implementation. The dispatch logic is to unmarshals any arguments from the input stream obtained from the call object, invokes the method (indicated by the operation number opnum) on the actual remote object implementation obj, and marshals the return value or throws an exception if one occurs during the invocation.
Correct me if i m wrong and any add-on information will be appreciated.
Cheers.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stubs and Skeleton were introduced with the RMI to remove the Remote Invocation Logic that were earlier made by RPC etc. It actually encapsulates the Serialization and Deserialization Logic between the client and Server talks.
It provides location transparency to remote object invocation, and other network specific issues like marshalling and demarshalling of objects is done in a simpler way of serialization and deserialization of java objects and transferring the objects from one JVM to the other remote JVM.
Hope it helps ............
------------------
enJoy Life with Technology ;-)
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
This does'nt contain Method Signatures. IT contain logic about packaging the arguments list , depackaging , location transparency,Marshalling ....
bye

Originally posted by Leena Diwan:
Hi !!
Stubs and skeletons contain the method signatures of the remote objects.
Anyone would like to comment ?
Regards..
Leena


 
Author
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is an example of a stub:
import java.rmi.server.*;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
public final synchronized class CallbackApplet_Stub
extends RemoteStub implements ClientInterface {
private static final long serialVersionUID = 2;
private static Method $method_popup_0;
static Class class$ClientInterface;
static Class class$java$lang$String;
static {
try {
$method_popup_0 = ((class$ClientInterface != null) ?
class$ClientInterface :
(class$ClientInterface = class$("ClientInterface"))).getMethod("popup", { (class$java$lang$String != null) ? class$java$lang$String : (class$java$lang$String = class$("java.lang.String")) });
} catch (NoSuchMethodException e) {
throw new NoSuchMethodError("stub class initialization failed");
}
}
public CallbackApplet_Stub(RemoteRef remoteRef) {
super(remoteRef);
}
static Class class$(String string) {
try {
return Class.forName(string);
} catch (ClassNotFoundException e) {
throw new NoClassDefFoundError(e.getMessage());
}
}
public void popup(String string)
throws RemoteException {
try {
Object object;
ref.invoke(this, $method_popup_0, { string }, -6724103847495166028);
} catch () {
throw object;
} catch () {
throw object;
} catch () {
throw new UnexpectedException("undeclared checked exception", object);
}
}
}
 
Manas Ahlaad
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

thanks all for your valuable replies and views
these let me to get good idea about stubs ,skeletons
regards
laxman
 
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Manas , you will get more idea about the STUB & SKELETON in rmi / corba forum.
Briefly , you can say that it is java extention of RPC ( Remote Procedure Call ) . Offcourse for distributed systems.
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They are plain java files. Just open them and see what they do
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic