Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.portals.bridges.util
Class ServletPortletSessionProxy

    java.lang.Object
      org.apache.portals.bridges.util.ServletPortletSessionProxy

All Implemented Interfaces:
  InvocationHandler

public class ServletPortletSessionProxy
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 `PortletWindowUtils` class can help out with that though.

Version:
  $Id: ServletPortletSessionProxy.java 549659 2007-06-22 01:21:29Z ate $
Author:
  Ate Douma
See Also:
  `PortletWindowUtils`

Field Summary
`(package private) String` | `portletWindowPrefix`
`(package private) javax.servlet.http.HttpSession` | `servletSession`

Constructor Summary
`private` | `ServletPortletSessionProxy(javax.servlet.http.HttpSession servletSession, String portletWindowPrefix)`

Method Summary
`static javax.servlet.http.HttpSession` | `createProxy(javax.servlet.http.HttpServletRequest request)`
`static javax.servlet.http.HttpSession` | `createProxy(javax.servlet.http.HttpServletRequest request, String portletWindowNamespace)`
`Object` | `invoke(Object proxy, Method m, Object[] args)` (non-Javadoc)

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### servletSession

    javax.servlet.http.HttpSession servletSession

### portletWindowPrefix

    String portletWindowPrefix

Constructor Detail

### ServletPortletSessionProxy

    private ServletPortletSessionProxy(javax.servlet.http.HttpSession servletSession,
                                       String portletWindowPrefix)

Method Detail

### createProxy

    public static javax.servlet.http.HttpSession createProxy(javax.servlet.http.HttpServletRequest request)

### createProxy

    public static javax.servlet.http.HttpSession createProxy(javax.servlet.http.HttpServletRequest request,
                                                             String portletWindowNamespace)

### invoke

    public Object invoke(Object proxy,
                         Method m,
                         Object[] args)
                  throws Throwable

  (non-Javadoc)

  Specified by:
    `invoke` in interface `InvocationHandler`
  Throws:
    `Throwable`
  See Also:
    `InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.