Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2005 The Apache Software Foundation
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry;

Optional interface implemented by Application State Objects. This interface allows Tapestry to optimize the storage of the objects into the session, only storing the objects when they require storage due to a change in internal state.

Howard M. Lewis Ship
public interface SessionStoreOptimized
Queried by the org.apache.tapestry.engine.state.StateObjectManager to see if the object actually needs to be stored. Objects that implement this interface should store an internal flag. The flag should be set when any change to the object's internal state occurs. The flag should be cleared when the object is stored into the session (typically, by implementing javax.servlet.http.HttpSessionBindingListener.

true if the object needs to be stored back into the session, false if the internal state of the object is unchanged
    boolean isStoreToSessionNeeded();
New to GrepCode? Check out our FAQ X