org.jasig.portal.spring.web.context.support
Class FailsafeSingletonScope

java.lang.Object
  extended by org.jasig.portal.spring.web.context.support.FailsafeSingletonScope
All Implemented Interfaces:
Scope, DisposableBean

public class FailsafeSingletonScope
extends Object
implements Scope, DisposableBean

Wraps a Scope to provide functionality when the wrapped scope can't function due to an illegal state (no current session, request, ...)

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
FailsafeSingletonScope(Scope delegateScope)
           
 
Method Summary
 void destroy()
           
 Object get(String name, ObjectFactory objectFactory)
           
 String getConversationId()
           
 void registerDestructionCallback(String name, Runnable callback)
           
 Object remove(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

FailsafeSingletonScope

public FailsafeSingletonScope(Scope delegateScope)
Method Detail

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface DisposableBean
Throws:
Exception

get

public Object get(String name,
                  ObjectFactory objectFactory)
Specified by:
get in interface Scope
See Also:
SessionScope.get(java.lang.String, org.springframework.beans.factory.ObjectFactory)

getConversationId

public String getConversationId()
Specified by:
getConversationId in interface Scope
See Also:
SessionScope.getConversationId()

registerDestructionCallback

public void registerDestructionCallback(String name,
                                        Runnable callback)
Specified by:
registerDestructionCallback in interface Scope
See Also:
AbstractRequestAttributesScope.registerDestructionCallback(java.lang.String, java.lang.Runnable)

remove

public Object remove(String name)
Specified by:
remove in interface Scope
See Also:
SessionScope.remove(java.lang.String)


Copyright © 2010 Jasig. All Rights Reserved.