net.sf.jportlet.portlet
Class Portlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--net.sf.jportlet.portlet.Portlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
PortletAdapter

public abstract class Portlet
extends javax.servlet.http.HttpServlet

The abstract Portlet is used by the portlet container to invoke the portlet.

Author:
Herve Tchepannou
See Also:
Serialized Form

Nested Class Summary
static class Portlet.Markup
          The Markup class is a finite enumeration of the possible markup languages that a portlet can supports
static class Portlet.Mode
          The Mode class is a finite enumeration of the possible modes that a portlet can assume
 
Constructor Summary
Portlet()
           
 
Method Summary
abstract  long getLastModified(net.sf.jportlet.portlet.PortletRequest request)
          Returns the time the response of the Portlet object was last modified, in milliseconds since midnight January 1, 1970 GMT.
 net.sf.jportlet.portlet.PortletConfig getPortletConfig()
          Returns the configuration of the portlet
 void init(net.sf.jportlet.portlet.PortletConfig portletConfig)
          Initialize the portlet
abstract  void login(net.sf.jportlet.portlet.PortletRequest request)
          Called by the portlet container to ask the portlet to initialize a personalized user experience
abstract  void logout(net.sf.jportlet.portlet.PortletRequest request)
          Called by the portlet container to indicate that a concrete portlet instance is being removed
abstract  void service(net.sf.jportlet.portlet.PortletRequest request, net.sf.jportlet.portlet.PortletResponse response)
          This function is invoke by the container in order to render the portlet
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Portlet

public Portlet()
Method Detail

getPortletConfig

public net.sf.jportlet.portlet.PortletConfig getPortletConfig()
Returns the configuration of the portlet

Returns:
PortletConfig

getLastModified

public abstract long getLastModified(net.sf.jportlet.portlet.PortletRequest request)
Returns the time the response of the Portlet object was last modified, in milliseconds since midnight January 1, 1970 GMT. If the time is unknown, this method returns a negative number (the default).

Portlets that can quickly determine their last modification time should override this method. This makes browser and proxy caches work more effectively, reducing the load on server and network resources

Parameters:
request -
Returns:
long

init

public void init(net.sf.jportlet.portlet.PortletConfig portletConfig)
          throws PortletException
Initialize the portlet

Throws:
PortletException - if any error occurs

login

public abstract void login(net.sf.jportlet.portlet.PortletRequest request)
                    throws PortletException
Called by the portlet container to ask the portlet to initialize a personalized user experience

Parameters:
request -
Throws:
PortletException

logout

public abstract void logout(net.sf.jportlet.portlet.PortletRequest request)
                     throws PortletException
Called by the portlet container to indicate that a concrete portlet instance is being removed

Parameters:
request -
PortletException

service

public abstract void service(net.sf.jportlet.portlet.PortletRequest request,
                             net.sf.jportlet.portlet.PortletResponse response)
                      throws PortletException,
                             java.io.IOException
This function is invoke by the container in order to render the portlet

Parameters:
request - current request
response - current response
Throws:
java.io.IOException - if any IO error occurs
PortletException - if any other error


Copyright © 2002 Herve Tchepannou. All Rights Reserved.