org.apache.beehive.netui.pageflow.handler
Interface StorageHandler

All Superinterfaces:
Handler

public interface StorageHandler
extends Handler

Handler for storing Page Flow objects.


Method Summary
 boolean allowBindingEvent(Object event)
          Tell whether a given binding event should be allowed to occur.
 void applyChanges(RequestContext context)
          Apply any deferred changes, at the end of a chain of requests.
 void dropChanges(RequestContext context)
          Drop any deferred changes, so they will not be applied at the end of the chain of requests.
 void ensureFailover(RequestContext context, String attributeName, Object value)
          Ensure that the given named attribute is replicated in a cluster for session failover, if appropriate.
 Object getAttribute(RequestContext context, String attributeName)
          Get a named attribute.
 Enumeration getAttributeNames(RequestContext context)
          Get all attribute names.
 void removeAttribute(RequestContext context, String attributeName)
          Remove a named attribute.
 void setAttribute(RequestContext context, String attributeName, Object value)
          Set a named attribute.
 
Methods inherited from interface Handler
init, reinit
 

Method Detail

setAttribute

void setAttribute(RequestContext context,
                  String attributeName,
                  Object value)
Set a named attribute.

Parameters:
context - the current RequestContext.
attributeName - the name of the attribute to set.
value - the attribute value.

removeAttribute

void removeAttribute(RequestContext context,
                     String attributeName)
Remove a named attribute.

Parameters:
context - the current RequestContext.
attributeName - the name of the attribute to remove.

getAttribute

Object getAttribute(RequestContext context,
                    String attributeName)
Get a named attribute.

Parameters:
context - the current RequestContext.
attributeName - the name of the attribute to get.
Returns:
the attribute, or null if there is no such named attribute.

ensureFailover

void ensureFailover(RequestContext context,
                    String attributeName,
                    Object value)
Ensure that the given named attribute is replicated in a cluster for session failover, if appropriate.

Parameters:
context - the current request context.
attributeName - the name of the attribute for which failover should be ensured.
value - the value of the attribute for which failover should be ensured.

allowBindingEvent

boolean allowBindingEvent(Object event)
Tell whether a given binding event should be allowed to occur. This is mainly useful in cases when this handler writes data to some underlying storage (like the HttpSession) at some time other than when setAttribute(org.apache.beehive.netui.pageflow.RequestContext, java.lang.String, java.lang.Object) is called, in which case a binding event would be misleading. Only PageFlowManagedObjects pay attention to this.

Parameters:
event - the binding event, e.g., javax.servlet.http.HttpSessionBindingEvent
Returns:
true if the event should be processed.

applyChanges

void applyChanges(RequestContext context)
Apply any deferred changes, at the end of a chain of requests.

Parameters:
context - the current request context.

dropChanges

void dropChanges(RequestContext context)
Drop any deferred changes, so they will not be applied at the end of the chain of requests.

Parameters:
context - the current request context.

getAttributeNames

Enumeration getAttributeNames(RequestContext context)
Get all attribute names.

Parameters:
context - the current request context.
Returns:
an Enumeration over all the attribute names;