01: /*
02: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
03: * @version $Id: PortletSessionListener.java 6385 2007-10-25 14:02:26Z wehrens $
04: */
05: package org.gridsphere.portletcontainer;
06:
07: import javax.servlet.http.HttpServletRequest;
08: import javax.servlet.http.HttpSession;
09:
10: /**
11: * The <code>PortletSessionListener</code> provides an interface for performing
12: * login and logout functionality.
13: */
14: public interface PortletSessionListener {
15:
16: /**
17: * Called by the portlet container to ask the portlet to initialize a
18: * personalized user experience. In addition to initializing the session
19: * this method allows the portlet to initialize the concrete portlet
20: * instance, for example, to store attributes in the session.
21: *
22: * @param request the portlet request
23: */
24: public void login(HttpServletRequest request);
25:
26: /**
27: * Called by the portlet container to indicate that a concrete portlet instance is being removed.
28: * This method gives the concrete portlet instance an opportunity to clean up any resources
29: * (for example, memory, file handles, threads), before it is removed.
30: * This happens if the user logs out, or decides to remove this portlet from a page.
31: *
32: * @param session the portlet session
33: */
34: public void logout(HttpSession session);
35:
36: }
|