Forums Register Login

What does the stub and skeleton exactly contain?

+Pie Number of slices to send: Send
What does the stub and skeleton exactly contain?
+Pie Number of slices to send: Send
Hi !!
Stubs and skeletons contain the method signatures of the remote objects.
Anyone would like to comment ?
Regards..
Leena
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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 ;-)
+Pie Number of slices to send: Send
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


+Pie Number of slices to send: Send
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);
}
}
}
+Pie Number of slices to send: Send

thanks all for your valuable replies and views
these let me to get good idea about stubs ,skeletons
regards
laxman
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
They are plain java files. Just open them and see what they do
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1041 times.
Similar Threads
Does the EJBObject act as a skeleton?
Skeleton in Java2
RMI
Stub and skeleton?
RMIC
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 21:20:42.