Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

org.apache.jetspeed.portlet
Interface PortletSessionListener

All Known Implementing Classes:
Portlet, PortletAdapter

public interface PortletSessionListener

This feature is an addition to the Portlet interface. To support session features in the portlet, this interface has to be implemented additionally to the Portlet interface.

Since:
4.1
Note:
This interface is designed to be implemented by clients.

Method Summary
 void login(PortletRequest request)
          Called by the portlet container before the service() method of this portlet is invoked for the first time in the context of a new user session.
 void logout(PortletSession session)
          Called by the portlet container when a user session terminates (by user logout or timeout) for which the login() method has been called before.
 

Method Detail

login

public void login(PortletRequest request)
           throws org.apache.jetspeed.portlet.PortletException
Called by the portlet container before the service() method of this portlet is invoked for the first time in the context of a new user session. This method will called at most once for any user session in the portal.

This method can be implemented by the portlet to initialize a personalized user experience. In addition to initializing the session this method allows the portlet to initialize the concrete portlet instance, for example, to store attributes in the session.

Parameters:
request - the portlet request
Throws:
PortletException - if the portlet has trouble fulfilling the request

logout

public void logout(PortletSession session)
            throws org.apache.jetspeed.portlet.PortletException
Called by the portlet container when a user session terminates (by user logout or timeout) for which the login() method has been called before. After this method has been called, the service() method of the portlet will nor be invoked again within the context of the same user session.

This method gives the concrete portlet instance an opportunity to clean up any resources (for example, memory, file handles, threads), before it is removed.

Parameters:
session - the portlet session
Throws:
PortletException - if the portlet has trouble fulfilling the request

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.