org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation
Class DefaultWindowContextQuotaHandler

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowContextQuotaHandler
All Implemented Interfaces:
Serializable, WindowContextQuotaHandler

@ApplicationScoped
public class DefaultWindowContextQuotaHandler
extends Object
implements WindowContextQuotaHandler

See Also:
Serialized Form

Constructor Summary
DefaultWindowContextQuotaHandler()
          Default constructor required by proxy libs
DefaultWindowContextQuotaHandler(WindowContextConfig windowContextConfig)
          Constructor used by the container for creating the WindowContextQuotaHandler based on the given WindowContextConfig
 
Method Summary
 void handleQuotaViolation()
          Handles a quota violation if #checkQuota returned true and the cleanup couldn't remove an old context
 boolean isWindowContextQuotaViolated(int activeWindowContextCount)
          Checks if the count of the currently active window-contexts is too high
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWindowContextQuotaHandler

public DefaultWindowContextQuotaHandler()
Default constructor required by proxy libs


DefaultWindowContextQuotaHandler

@Inject
public DefaultWindowContextQuotaHandler(WindowContextConfig windowContextConfig)
Constructor used by the container for creating the WindowContextQuotaHandler based on the given WindowContextConfig

Parameters:
windowContextConfig - current window-context-config
Method Detail

isWindowContextQuotaViolated

public boolean isWindowContextQuotaViolated(int activeWindowContextCount)
Checks if the count of the currently active window-contexts is too high

Specified by:
isWindowContextQuotaViolated in interface WindowContextQuotaHandler
Parameters:
activeWindowContextCount - current window-context count
Returns:
true if the count is too high and a cleanup has to be triggered, false otherwise

handleQuotaViolation

public void handleQuotaViolation()
Handles a quota violation if #checkQuota returned true and the cleanup couldn't remove an old context

Specified by:
handleQuotaViolation in interface WindowContextQuotaHandler


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.