org.apache.wsrp4j.consumer
Interface PortletSession

All Known Implementing Classes:
GenericPortletSessionImpl

public interface PortletSession

Defines a session object at the consumer-side to store remote portlet related information that are needed to interact with the portlet. Since a session context is not mandatory in WSRP a consumer portlet instance key is taken to uniquely identify a portlet session.


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.
 PortletWindowSession getPortletWindowSession(java.lang.String windowID)
          Get the SimplePortletWindowSession 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 portletHandle)
          Set the portlet handle of the portlet this session belongs to.
 void setSessionContext(SessionContext sessionContext)
          Set the session context of the portlet instance.
 

Method Detail

getPortletHandle

public java.lang.String getPortletHandle()
Get the portlet handle which uniquely identifies the portlet session at the consumer side.

Returns:
The portlet handle

setPortletHandle

public void setPortletHandle(java.lang.String portletHandle)
Set the portlet handle of the portlet this session belongs to.

Parameters:
portletHandle - The portlet handle

getSessionContext

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

Returns:
The the session context if set from the producer or null otherwise.

setSessionContext

public void setSessionContext(SessionContext sessionContext)
Set the session context of the portlet instance.

Parameters:
sessionContext - The session context.

getPortletWindowSession

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

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

Returns:
An Iterator of SimplePortletWindowSession objects.

removePortletWindowSession

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

Parameters:
windowID - The ObjectID 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.