GridSphere Portlet API

The GridSphere Portlet API is an implementation based upon the GridLab Portal Technical Specification. The Portlet API presented has been based largely on the IBM WebSphere Portlet API 4.1.

In particular the portlet hierarchy is as follows:

Portlet implements PortletSessionListener
^
|
PortletAdapter
^
|
AbstractPortlet implements ActionListener, MessageListener, WindowListener, PortletTitleListener

Portlet developers would subclass the AbstractPortlet and override the hook methods of the various Listeners for added functionality.

The following list is the order in which portlet lifecycle methods are invoked:

  1. {@link org.gridlab.gridsphere.portlet.PortletAdapter#init(PortletConfig)} is invoked. This provides the application portlet with its initial configuration, {@link org.gridlab.gridsphere.portlet.PortletConfig}.
  2. {@link org.gridlab.gridsphere.portlet.PortletAdapter#initConcrete(PortletSettings)} is invoked. This provides the concrete portlet instance with its initial configuration, {@link org.gridlab.gridsphere.portlet.PortletSettings}.
  3. {@link org.gridlab.gridsphere.portlet.PortletAdapter#login(PortletRequest)} is invoked. Once a user has successfully logged in, the login() method is invoked for each of the portlets in their subscription list.
  4. {@link org.gridlab.gridsphere.portlet.AbstractPortlet#service(PortletRequest, PortletResponse)} is invoked. This services the concrete portlet instance for a particular user request. This lifecycle method is invoked on concrete portlets for each and every user request.
  5. Additionally the following lifecycle methods may be performed in the following order:
      An appropriate portlet action method is called: An appropriate portlet render method is called:
  6. {@link org.gridlab.gridsphere.portlet.PortletAdapter#logout(PortletSession)} is invoked. The logout() method is invoked for each of the portlets a user's subscription list.
  7. {@link org.gridlab.gridsphere.portlet.PortletAdapter#destroyConcrete(PortletSettings)} is invoked. This destroys the concrete portlet instance.
  8. {@link org.gridlab.gridsphere.portlet.PortletAdapter#destroy()} is invoked. This destroys the application portlet and takes it out of service.