org.apache.tapestry5
Class BaseOptimizedSessionPersistedObject

java.lang.Object
  extended by org.apache.tapestry5.BaseOptimizedSessionPersistedObject
All Implemented Interfaces:
EventListener, HttpSessionBindingListener, OptimizedSessionPersistedObject
Direct Known Subclasses:
BaseOptimizedApplicationStateObject, ValidationTrackerImpl

public abstract class BaseOptimizedSessionPersistedObject
extends Object
implements OptimizedSessionPersistedObject, HttpSessionBindingListener

Base implementation of OptimizedSessionPersistedObject. Subclasses should invoke markDirty() when internal state of the object changes.

Since:
5.1.1.0

Constructor Summary
BaseOptimizedSessionPersistedObject()
           
 
Method Summary
 boolean isSessionPersistedObjectDirty()
          Returns true if the object has in-memory changes.
protected  void markDirty()
          Invoked by the subclass whenever the internal state of the object changes.
 void valueBound(HttpSessionBindingEvent event)
          Invoked by the servlet container when the value is stored (or re-stored) as an attribute of the session.
 void valueUnbound(HttpSessionBindingEvent event)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseOptimizedSessionPersistedObject

public BaseOptimizedSessionPersistedObject()
Method Detail

isSessionPersistedObjectDirty

public final boolean isSessionPersistedObjectDirty()
Description copied from interface: OptimizedSessionPersistedObject
Returns true if the object has in-memory changes. It is the object's responsibility to set its internal flag to false, typically by implementing HttpSessionBindingListener.

Specified by:
isSessionPersistedObjectDirty in interface OptimizedSessionPersistedObject
Returns:

valueBound

public void valueBound(HttpSessionBindingEvent event)
Invoked by the servlet container when the value is stored (or re-stored) as an attribute of the session. This clears the dirty flag. Subclasses may override this method, but should invoke this implementation.

Specified by:
valueBound in interface HttpSessionBindingListener

valueUnbound

public void valueUnbound(HttpSessionBindingEvent event)
Does nothing.

Specified by:
valueUnbound in interface HttpSessionBindingListener

markDirty

protected final void markDirty()
Invoked by the subclass whenever the internal state of the object changes. Typically, this is invoked from mutator methods.



Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.