org.objectweb.jeremie.stub_factories.std

Class OptSkeleton

Implemented Interfaces:
RequestSession
Known Direct Subclasses:
JRMIReferenceImpl_OWSkel, JRMIReferenceImpl_Skel, RegistryImpl_OWSkel, RegistryImpl_Skel

public abstract class OptSkeleton
extends 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 ClassLoader
class_loader
the class loader use to create this skeleton - may be used to load classes needed by the skeleton.
protected Object
target
The target object held by this skeleton.

Constructor Summary

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

Method Summary

boolean
equals(Object other)
Tests for skeleton equality, defined as object equality (equals) of the target objects.
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.
void
send(UnMarshaller unmarshaller, ReplySession session)
Sends an invocation to the target object represented by this skeleton.

Field Details

class_loader

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


target

protected Object target
The target object held by this skeleton.

Constructor Details

OptSkeleton

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


OptSkeleton

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

Method Details

equals

public boolean equals(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.


getTarget

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

Returns:
the target object represented by this skeleton.


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.


send

public void send(UnMarshaller unmarshaller,
                 ReplySession session)
            throws 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.

Parameters:
unmarshaller - an unmarshaller representing the invocation;
session - a reply session to which the result of the invocation is to be sent;