com.ibm.wps.pe.pc.legacy.cache
Class CacheablePortlet

java.lang.Object
  extended by HttpServlet
      extended by com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet

Deprecated. since 6.0. Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.

public abstract class CacheablePortlet
extends HttpServlet

The abstract CacheablePortlet is used by the portlet container to provide the CacheableServlet interface for portlets.

This class is part of the public portlet API because the public class org.apache.jetspeed.portlet.Portlet is derived from it, and so, implcitly, all portlets written for the IBM portlet API. This class should never be referenced explicitly. There is no need to do so as this class only implements the caching support.

Since:
5.1

Constructor Summary
CacheablePortlet()
          Deprecated. Default constructor.
 
Method Summary
abstract  java.lang.String getId(javax.servlet.http.HttpServletRequest request)
          Deprecated. This method is used by the WebSphere Dynacache to generate a cache ID.
abstract  long getLastModified(PortletRequest request)
          Deprecated. Returns the time the response of the CacheablePortlet object was last modified, in milliseconds since midnight January 1, 1970 GMT.
 int getSharingPolicy(javax.servlet.http.HttpServletRequest request)
          Deprecated. This returns the sharing policy used for this cache entry.
protected  void service(HttpServletRequest request, HttpServletResponse response)
          Deprecated. This method is used internally to invoke the portlet as a servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheablePortlet

public CacheablePortlet()
Deprecated. 
Default constructor. This constructor must not be called by application code.

Method Detail

getId

public abstract java.lang.String getId(javax.servlet.http.HttpServletRequest request)
Deprecated. 
This method is used by the WebSphere Dynacache to generate a cache ID. It must not be overridden by portlets.

Parameters:
request - The HTTP request object.
Returns:
The cache id. A null indicates that the portlet should not be cached.

getSharingPolicy

public int getSharingPolicy(javax.servlet.http.HttpServletRequest request)
Deprecated. 
This returns the sharing policy used for this cache entry. It must not be overridden by portlets.
Portlets always use SHARED_PULL (shared between multiple VMs and requested via pull).

Parameters:
request - The HTTP request object.
Returns:
The sharing policy

getLastModified

public abstract long getLastModified(PortletRequest request)
Deprecated. 
Returns the time the response of the CacheablePortlet 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).
This method is implemented in org.apache.jetspeed.portlet.Portlet and can be overridden by portlets.
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 - the PortletRequest object that is sent to the portlet
Returns:
a long integer specifying the time the response of the Cacheable object was last modified, in milliseconds since midnight, January 1, 1970 GMT, or -1 if the time is not known

service

protected void service(HttpServletRequest request,
                       HttpServletResponse response)
                throws ServletException,
                       java.io.IOException
Deprecated. 
This method is used internally to invoke the portlet as a servlet. It must not be overridden by portlets.

Throws:
ServletException
java.io.IOException