uka.karmi.rmi
Class RemoteSkeleton

java.lang.Object
  extended byuka.karmi.rmi.RemoteSkeleton

public abstract class RemoteSkeleton
extends java.lang.Object

Base class for skeleton objects. Skeleton objects unmarshal method arguments from a ServerConnection and pass them to the server implementation method. The concrete sub-classes of RemoteSkeleton are generated by the stub and skeleton generator. Skeletons are the server-side counterpart to client-side stubs.

Author:
Bernhard Haumacher, Christian Nester
See Also:
RemoteStub, doApplicationCall(ServerConnection), ServerConnection

Constructor Summary
RemoteSkeleton()
           
 
Method Summary
abstract  void doApplicationCall(ServerConnection c)
          Dispatches the remotely called method to the server implementation object.
protected abstract  Remote getRemoteObject()
           
abstract  void setRemoteObject(Remote object)
          Sets a remote object.
 java.lang.String toString()
           
 java.lang.String toStringMembers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteSkeleton

public RemoteSkeleton()
Method Detail

setRemoteObject

public abstract void setRemoteObject(Remote object)
Sets a remote object. Only the KaRMI runtime system is allowed to call this method.


getRemoteObject

protected abstract Remote getRemoteObject()

doApplicationCall

public abstract void doApplicationCall(ServerConnection c)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException

Dispatches the remotely called method to the server implementation object. This method is overridden in concrete skeleton classes for remote objects.

This method is called from the remote server reference during the method dispatch process.

Since the concrete skeleton sub-classes are generated by the stub and skeleton generator, the principal actions that are performed in a concrete doApplicationCall() method are given below.

  1. According to the method identifier, a pice of code individual to each server method is selected.
  2. The arguments to the method are unmarshaled from the connection. The unmarshaling knows the types of the parameters and therefore can call the appropriate unmarshaling methods from the connection class.
  3. closeReceiveCall() is called on the connection to indicate that the call is unmarshaled completely and processing will start immediately.
  4. The requested method is invoked on the server implementation object. The unmarshaled arguments are passed to the server method.
  5. openSendResult() is called on the connection object to indicate either the successful or exceptional completion of the server implementation method.
  6. The result returned from the server method or the exception thrown from the server method is marshaled to the connection.
  7. The remote call is processed and the doApplicationCall() method returns to its caller for cleaning up the connection.

Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
RemoteServerRef.doApplicationCall(ServerConnection), ServerConnection, ServerConnection.closeReceiveCall(), ServerConnection.openSendResult(boolean)

toStringMembers

public java.lang.String toStringMembers()

toString

public java.lang.String toString()