org.sourceforge.jemm.lifecycle
Class ShadowUserObjectImpl

java.lang.Object
  extended by org.sourceforge.jemm.lifecycle.ShadowUserObjectImpl
All Implemented Interfaces:
ShadowObject, ShadowUserObject

public class ShadowUserObjectImpl
extends java.lang.Object
implements ShadowUserObject

An implementation of the ShadowObject interface that passes all method calls onto a set MethodListener.

Author:
Paul Keeble

Constructor Summary
ShadowUserObjectImpl(JEMMObject object, MethodListener l, ID id, int version)
           
ShadowUserObjectImpl(MethodListener l, ID id, int version)
           
 
Method Summary
 void beginLock()
          Acquire the synchronisation lock the object is up to date with the current store version.
 void beginLock(java.lang.Object obj)
          Acquire the synchronisation lock on the given object.
 void endLock()
          Release the held read or write lock.
 void endLock(java.lang.Object obj)
          Release the held read or write lock on the given object.
 void entityEntered(java.lang.String methodSignature)
          Signifies the beginning of a method execution
 void entityExited(java.lang.String methodSignature)
          Signifies the end of a method execution
 ShadowData getData()
          Returns the ShadowData structure associated with this ShadowObject and the enhanced class which contains all the Object data.
 ID getID()
           
 JEMMObject getUserObject()
          Returns the JEMMObject user object that this ShadowObject related too.
 int getVersion()
           
 void setUserObject(JEMMObject newObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadowUserObjectImpl

public ShadowUserObjectImpl(JEMMObject object,
                            MethodListener l,
                            ID id,
                            int version)

ShadowUserObjectImpl

public ShadowUserObjectImpl(MethodListener l,
                            ID id,
                            int version)
Method Detail

beginLock

public void beginLock()
Description copied from interface: ShadowUserObject
Acquire the synchronisation lock the object is up to date with the current store version.

Specified by:
beginLock in interface ShadowUserObject

beginLock

public void beginLock(java.lang.Object obj)
Description copied from interface: ShadowUserObject
Acquire the synchronisation lock on the given object.

Specified by:
beginLock in interface ShadowUserObject
Parameters:
obj - The target object to synchronise on.

endLock

public void endLock()
Description copied from interface: ShadowUserObject
Release the held read or write lock.

Specified by:
endLock in interface ShadowUserObject

endLock

public void endLock(java.lang.Object obj)
Description copied from interface: ShadowUserObject
Release the held read or write lock on the given object.

Specified by:
endLock in interface ShadowUserObject
Parameters:
obj - The target object to synchronise on.

entityEntered

public void entityEntered(java.lang.String methodSignature)
Description copied from interface: ShadowUserObject
Signifies the beginning of a method execution

Specified by:
entityEntered in interface ShadowUserObject

entityExited

public void entityExited(java.lang.String methodSignature)
Description copied from interface: ShadowUserObject
Signifies the end of a method execution

Specified by:
entityExited in interface ShadowUserObject

getUserObject

public JEMMObject getUserObject()
Description copied from interface: ShadowObject
Returns the JEMMObject user object that this ShadowObject related too. If needed (for example with RemoteStore) the object will be instantiated.

Specified by:
getUserObject in interface ShadowObject
Returns:
The user object instance being shadowed

setUserObject

public void setUserObject(JEMMObject newObject)

getID

public ID getID()
Specified by:
getID in interface ShadowObject
Returns:
The unique ID of the object being managed.

getVersion

public int getVersion()

getData

public ShadowData getData()
Description copied from interface: ShadowUserObject
Returns the ShadowData structure associated with this ShadowObject and the enhanced class which contains all the Object data.

Specified by:
getData in interface ShadowUserObject
Returns:
The data object instance.


Copyright © 2009. All Rights Reserved.