org.apache.wsrp4j.consumer.driver
Class GenericGroupSessionImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.InitCookieInfoImpl
      extended byorg.apache.wsrp4j.consumer.driver.GenericGroupSessionImpl
All Implemented Interfaces:
GroupSession, GroupSessionMgr, InitCookieInfo

public abstract class GenericGroupSessionImpl
extends InitCookieInfoImpl
implements GroupSessionMgr

Class implements a consumer based group session


Field Summary
protected  java.util.Hashtable portletSessions
           
 
Constructor Summary
GenericGroupSessionImpl(java.lang.String groupID, java.lang.String markupInterfaceURL)
           
 
Method Summary
 void addPortletSession(PortletSession portletSession)
          Add a portlet session to this group session.
 boolean existsPortletSession(java.lang.String portletHandle)
          Check if the group session holds a portlet session with the given key.
 java.util.Iterator getAllPortletSessions()
          Get all portlet session objects currently stored in the group session.
 java.lang.String getGroupID()
          Get the ID of the group this group session belongs to.
abstract  PortletSession getPortletSession(java.lang.String portletHandle)
          Get the portlet session object which is identified with the givven instanceKey from the group session.
 void removeAllPortletSessions()
          Removes all portlet session objects from the group session.
 void removePortletSession(java.lang.String portletHandle)
          Remove the portlet session object with the given key from the group session.
 void setGroupID(java.lang.String groupID)
          Set the ID of the group this group session belongs to.
 
Methods inherited from class org.apache.wsrp4j.consumer.driver.InitCookieInfoImpl
getMarkupInterfaceURL, getWSRPBaseService, isInitCookieDone, isInitCookieRequired, setInitCookieDone, setInitCookieRequired, setWSRPBaseService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wsrp4j.consumer.InitCookieInfo
getMarkupInterfaceURL, getWSRPBaseService, isInitCookieDone, isInitCookieRequired, setInitCookieDone, setInitCookieRequired, setWSRPBaseService
 

Field Detail

portletSessions

protected java.util.Hashtable portletSessions
Constructor Detail

GenericGroupSessionImpl

public GenericGroupSessionImpl(java.lang.String groupID,
                               java.lang.String markupInterfaceURL)
                        throws WSRPException
Method Detail

getGroupID

public java.lang.String getGroupID()
Description copied from interface: GroupSession
Get the ID of the group this group session belongs to.

Specified by:
getGroupID in interface GroupSession
Returns:
The group ID

setGroupID

public void setGroupID(java.lang.String groupID)
Description copied from interface: GroupSession
Set the ID of the group this group session belongs to.

Specified by:
setGroupID in interface GroupSession
Parameters:
groupID - ID of the group

addPortletSession

public void addPortletSession(PortletSession portletSession)
Description copied from interface: GroupSession
Add a portlet session to this group session.

Specified by:
addPortletSession in interface GroupSession
Parameters:
portletSession - The portlet session which should be added to this group session.

getPortletSession

public abstract PortletSession getPortletSession(java.lang.String portletHandle)
Description copied from interface: GroupSession
Get the portlet session object which is identified with the givven instanceKey from the group session. If no portlet session with that instanceKey exists it depends of the implementation wether null or a newly created portlet session object is returned.

Specified by:
getPortletSession in interface GroupSession
Parameters:
portletHandle - The key which identifies the portlet session object
Returns:
The portlet session with the given key

getAllPortletSessions

public java.util.Iterator getAllPortletSessions()
Description copied from interface: GroupSession
Get all portlet session objects currently stored in the group session.

Specified by:
getAllPortletSessions in interface GroupSession
Returns:
Iterator with all portlet session objects in the group session.

removePortletSession

public void removePortletSession(java.lang.String portletHandle)
Description copied from interface: GroupSession
Remove the portlet session object with the given key from the group session. Subsequent calls of getPortletSession with the same key should either return null or a newly created object.

Specified by:
removePortletSession in interface GroupSession
Parameters:
portletHandle - Key which identifies the portlet session object to be removed.

removeAllPortletSessions

public void removeAllPortletSessions()
Description copied from interface: GroupSession
Removes all portlet session objects from the group session. Consequently this methods can be used to clear the group session.

Specified by:
removeAllPortletSessions in interface GroupSession

existsPortletSession

public boolean existsPortletSession(java.lang.String portletHandle)
Description copied from interface: GroupSession
Check if the group session holds a portlet session with the given key.

Specified by:
existsPortletSession in interface GroupSession
Returns:
True if the group session holds a protlet session with the given key; false otherwise