|
spring-webmvc-portlet | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.portlet.context.PortletContextScope
public class PortletContextScope
Scope
wrapper for a PortletContext, i.e. for global web application attributes.
This differs from traditional Spring singletons in that it exposes attributes in the PortletContext. Those attributes will get destroyed whenever the entire application shuts down, which might be earlier or later than the shutdown of the containing Spring ApplicationContext.
The associated destruction mechanism relies on a
ContextCleanupListener
being registered in
web.xml
. Note that ContextLoaderListener
includes ContextCleanupListener's functionality.
This scope is registered as default scope with key
"application"
.
ContextCleanupListener
Constructor Summary | |
---|---|
PortletContextScope(javax.portlet.PortletContext portletContext)
Create a new Scope wrapper for the given PortletContext. |
Method Summary | |
---|---|
void |
destroy()
Invoke all registered destruction callbacks. |
java.lang.Object |
get(java.lang.String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory)
|
java.lang.String |
getConversationId()
|
void |
registerDestructionCallback(java.lang.String name,
java.lang.Runnable callback)
|
java.lang.Object |
remove(java.lang.String name)
|
java.lang.Object |
resolveContextualObject(java.lang.String key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortletContextScope(javax.portlet.PortletContext portletContext)
portletContext
- the PortletContext to wrapMethod Detail |
---|
public java.lang.Object get(java.lang.String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
get
in interface org.springframework.beans.factory.config.Scope
public java.lang.Object remove(java.lang.String name)
remove
in interface org.springframework.beans.factory.config.Scope
public void registerDestructionCallback(java.lang.String name, java.lang.Runnable callback)
registerDestructionCallback
in interface org.springframework.beans.factory.config.Scope
public java.lang.Object resolveContextualObject(java.lang.String key)
resolveContextualObject
in interface org.springframework.beans.factory.config.Scope
public java.lang.String getConversationId()
getConversationId
in interface org.springframework.beans.factory.config.Scope
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
ContextCleanupListener
|
spring-webmvc-portlet | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |