mandala.jacob.remote.gpf
Class AbstractSingletonRemoteProxy

java.lang.Object
  extended bymandala.jacob.remote.AbstractRemote
      extended bymandala.jacob.remote.AbstractLocalReferenceRetriever
          extended bymandala.jacob.remote.gpf.AbstractSingletonRemoteProxy
All Implemented Interfaces:
LocalReferenceRetriever, Remote, java.io.Serializable
Direct Known Subclasses:
RemoteCollectionProxy, RemoteMapProxy

public abstract class AbstractSingletonRemoteProxy
extends AbstractLocalReferenceRetriever

Abstract base class for remote proxy with singleton implementation.

This class contains two fields:

The singleton pattern for remote instances is defined as follow:
if proxy(o) represents a remote proxy on the remote object o then,
proxy1(o1) == proxy2(o2) if and only if o1 == o2.

This class manages the singleton property. Any subclass must ensure that super.readResove() is invoked.

Since:
2.3
Version:
$Revision: 1.2 $
Author:
eipi
See Also:
Client, Exporter, AbstractRemoteProxy, Serialized Form

Field Summary
protected  Client client
           
protected  Exporter exporter
           
 
Fields inherited from class mandala.jacob.remote.AbstractRemote
defaultExceptionHandler, exceptionHandler, syslog
 
Method Summary
protected  java.lang.Object readResolve()
          Ensure singleton on deserialization.
 java.lang.String toString()
           
 
Methods inherited from class mandala.jacob.remote.AbstractLocalReferenceRetriever
finalize, getID, getLocalReference
 
Methods inherited from class mandala.jacob.remote.AbstractRemote
getDefaultExceptionHandler, getExceptionHandler, getSyslog, handleException, setDefaultExceptionHandler, setExceptionHandler, setSyslog
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mandala.jacob.remote.Remote
getExceptionHandler, setExceptionHandler
 

Field Detail

client

protected final Client client

exporter

protected final Exporter exporter
Method Detail

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException

Ensure singleton on deserialization.

Subclasses may overwrite this method, but must call the one of this class to prevent memory leak!

Returns:
an Object value
Throws:
java.io.ObjectStreamException - if an error occurs

toString

public java.lang.String toString()
Overrides:
toString in class AbstractLocalReferenceRetriever


Mandala help mailing list