org.objectweb.jeremie.libs.stub_factories.std
Class OptSkeleton

java.lang.Object
  extended byorg.objectweb.jeremie.libs.stub_factories.std.OptSkeleton
All Implemented Interfaces:
RequestSession
Direct Known Subclasses:
JRMIReferenceImpl_Skel, RegistryImpl_Skel

public abstract class OptSkeleton
extends java.lang.Object
implements RequestSession

Provides an abstract implementation of a Jeremie server-side skeleton. A skeleton is a request session and represents the target object of an invocation.


Field Summary
protected  java.lang.ClassLoader class_loader
          the class loader use to create this skeleton - may be used to load classes needed by the skeleton.
protected  java.lang.Object target
          The target object held by this skeleton.
 
Constructor Summary
protected OptSkeleton()
          Creates an optimised Jeremie skeleton with itself as the target.
protected OptSkeleton(java.lang.Object target)
          Creates an optimised Jeremie skeleton with the given target.
 
Method Summary
 boolean equals(java.lang.Object other)
          Tests for skeleton equality, defined as object equality (equals) of the target objects.
 java.lang.Object getTarget()
          Returns the target object represented by this skeleton.
 int hashCode()
          Returns a hashcode for this skeleton, defined as the hashcode of its target object.
abstract  void send(UnMarshaller unmarshaller, ReplySession session)
          Sends an invocation to the target object represented by this skeleton.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected transient java.lang.Object target
The target object held by this skeleton.


class_loader

protected transient java.lang.ClassLoader class_loader
the class loader use to create this skeleton - may be used to load classes needed by the skeleton.

Constructor Detail

OptSkeleton

protected OptSkeleton()
Creates an optimised Jeremie skeleton with itself as the target.


OptSkeleton

protected OptSkeleton(java.lang.Object target)
Creates an optimised Jeremie skeleton with the given target.

Method Detail

send

public abstract void send(UnMarshaller unmarshaller,
                          ReplySession session)
                   throws org.objectweb.jonathan.apis.kernel.JonathanException
Sends an invocation to the target object represented by this skeleton.

A reply session is sent to the target object along with the invocation (represented by an unmarshaller). The target object must use the reply session to send back a reply.

Specified by:
send in interface RequestSession
Parameters:
unmarshaller - an unmarshaller representing the invocation;
session - a reply session to which the result of the invocation is to be sent;
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.

getTarget

public java.lang.Object getTarget()
Returns the target object represented by this skeleton.

Specified by:
getTarget in interface RequestSession
Returns:
the target object represented by this skeleton.

equals

public boolean equals(java.lang.Object other)
Tests for skeleton equality, defined as object equality (equals) of the target objects.

Parameters:
other - the skeleton to be compared with.
Returns:
the result of testing object equality (equals) of the target objects.

hashCode

public int hashCode()
Returns a hashcode for this skeleton, defined as the hashcode of its target object.

Returns:
the hashcode of this skeleton's target object.