org.apache.wsrp4j.consumer.driver
Class GenericPortletSessionImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericPortletSessionImpl
All Implemented Interfaces:
PortletSession

public abstract class GenericPortletSessionImpl
extends java.lang.Object
implements PortletSession


Field Summary
protected  java.util.Map windowSessions
           
 
Constructor Summary
GenericPortletSessionImpl(java.lang.String handle)
           
 
Method Summary
 java.util.Iterator getAllPorletWindowSessions()
          Get all window session which belong to the portlet session
 java.lang.String getPortletHandle()
          Get the portlet handle which uniquely identifies the portlet session at the consumer side.
abstract  PortletWindowSession getPortletWindowSession(java.lang.String windowID)
          Get the PortletWindowSession of the portlet window with the given ID.
 SessionContext getSessionContext()
          Get the WSRP session context of the portlet instance.
 void removeAllPortletWindowSessions()
          Remove all portlet window sessions which belong to this portlet session.
 PortletWindowSession removePortletWindowSession(java.lang.String windowID)
          Remove the porlet window session with the given window id.
 void setPortletHandle(java.lang.String handle)
          Set the portlet handle of the portlet this session belongs to.
 void setSessionContext(SessionContext ctx)
          Set the session context of the portlet instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

windowSessions

protected final java.util.Map windowSessions
Constructor Detail

GenericPortletSessionImpl

public GenericPortletSessionImpl(java.lang.String handle)
Method Detail

getPortletHandle

public java.lang.String getPortletHandle()
Description copied from interface: PortletSession
Get the portlet handle which uniquely identifies the portlet session at the consumer side.

Specified by:
getPortletHandle in interface PortletSession
Returns:
The portlet handle

setPortletHandle

public void setPortletHandle(java.lang.String handle)
Description copied from interface: PortletSession
Set the portlet handle of the portlet this session belongs to.

Specified by:
setPortletHandle in interface PortletSession
Parameters:
handle - The portlet handle

getSessionContext

public SessionContext getSessionContext()
Description copied from interface: PortletSession
Get the WSRP session context of the portlet instance. If no session context was set from the producer this method returns null.

Specified by:
getSessionContext in interface PortletSession
Returns:
The the session context if set from the producer or null otherwise.

setSessionContext

public void setSessionContext(SessionContext ctx)
Description copied from interface: PortletSession
Set the session context of the portlet instance.

Specified by:
setSessionContext in interface PortletSession
Parameters:
ctx - The session context.

getPortletWindowSession

public abstract PortletWindowSession getPortletWindowSession(java.lang.String windowID)
Get the PortletWindowSession of the portlet window with the given ID.

Specified by:
getPortletWindowSession in interface PortletSession
Parameters:
windowID - The ID of the portlet window
Returns:
The PorletWindowSession with the given ID.

getAllPorletWindowSessions

public java.util.Iterator getAllPorletWindowSessions()
Get all window session which belong to the portlet session

Specified by:
getAllPorletWindowSessions in interface PortletSession
Returns:
An Iterator of SimplePortletWindowSession objects.

removePortletWindowSession

public PortletWindowSession removePortletWindowSession(java.lang.String windowID)
Remove the porlet window session with the given window id.

Specified by:
removePortletWindowSession in interface PortletSession
Parameters:
windowID - The ID of the portlet window whichs session shoul dbe removed
Returns:
The portlet window session which has been removed or null if the session did not exist.

removeAllPortletWindowSessions

public void removeAllPortletWindowSessions()
Remove all portlet window sessions which belong to this portlet session.

Specified by:
removeAllPortletWindowSessions in interface PortletSession