org.apache.myfaces.orchestra.conversation
Class AccessScopeManager

java.lang.Object
  extended by org.apache.myfaces.orchestra.conversation.AccessScopeManager
Direct Known Subclasses:
FlashScopeManager

public class AccessScopeManager
extends Object

Manager to deal with page scoped beans.

Instances of this type are expected to be request-scoped, ie a new instance is used for each request. The AccessScopeManagerConfiguration object that it references can be of application scope.

Since:
1.1

Constructor Summary
AccessScopeManager()
           
 
Method Summary
 void addConversationAccess(String conversationName)
          Add a conversation to the list of accessed conversations.
 void beginRecording()
          This is invoked at the point in the request lifecycle after which we want to start tracking use of access-scoped objects.
 AccessScopeManagerConfiguration getAccessScopeManagerConfiguration()
           
static AccessScopeManager getInstance()
           
 boolean isConversationAccessed(String name)
           
 boolean isIgnoreRequest()
           
 void setAccessScopeManagerConfiguration(AccessScopeManagerConfiguration accessScopeManagerConfiguration)
           
 void setIgnoreRequest()
          Suppress access scope for the current request, ie do not terminate conversations that are not accessed by this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessScopeManager

public AccessScopeManager()
Method Detail

getInstance

public static AccessScopeManager getInstance()

getAccessScopeManagerConfiguration

public AccessScopeManagerConfiguration getAccessScopeManagerConfiguration()

setAccessScopeManagerConfiguration

public void setAccessScopeManagerConfiguration(AccessScopeManagerConfiguration accessScopeManagerConfiguration)

beginRecording

public void beginRecording()
This is invoked at the point in the request lifecycle after which we want to start tracking use of access-scoped objects.


addConversationAccess

public void addConversationAccess(String conversationName)
Add a conversation to the list of accessed conversations.

This method is expected to be called via AOP proxies wrapped around each conversation-scoped bean; any invocation of a method on such a bean causes the conversation associated with that bean to be added to the accessed list here.


isIgnoreRequest

public boolean isIgnoreRequest()

setIgnoreRequest

public void setIgnoreRequest()
Suppress access scope for the current request, ie do not terminate conversations that are not accessed by this request.

This can come in useful occasionally, particularly when handling AJAX requests which only access some of the beans associated with the current view.


isConversationAccessed

public boolean isConversationAccessed(String name)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.