org.apache.wicket.portlet
Class PortletHttpSessionWrapper
java.lang.Object
org.apache.wicket.portlet.PortletHttpSessionWrapper
- All Implemented Interfaces:
- InvocationHandler
public class PortletHttpSessionWrapper
- extends Object
- implements InvocationHandler
Proxy for a Servlet HttpSession to attach to a PortletSession, providing only access to PORTLET_SCOPE session attributes and hiding the APPLICATION_SCOPE attributes from the Servlet.
This Proxy can be used to isolate two instances of the same Portlet dispatching to Servlets so they don't overwrite or read each others session attributes.
Caveat: APPLICATION_SCOPE sessions attributes cannot be used anymore (directly) for inter-portlet communication, or when using Servlets directly which also need to "attach" to the PORTLET_SCOPE session attributes.
The org.apache.portals.bridges.util.PortletWindowUtils class can help out with that though.
Note: copied and adapted from the Apache Portal Bridges Common project
- Author:
- Ate Douma, Sebastian Thomschke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invoke
public Object invoke(Object proxy,
Method m,
Object[] args)
throws Throwable
-
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
createProxy
public static HttpSession createProxy(HttpServletRequest request,
String portletWindowId)
Copyright © 2015. All Rights Reserved.