Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
com.ibm.wps.pe.pc.legacy.cache
Class CacheablePortletjava.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet
- All Implemented Interfaces:
- com.ibm.websphere.servlet.cache.CacheableServlet, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- Portlet
- public abstract class CacheablePortlet
- extends javax.servlet.http.HttpServlet
- implements com.ibm.websphere.servlet.cache.CacheableServlet
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 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
- See Also:
- Serialized Form
Constructor Summary CacheablePortlet()
Default constructor.
Method Summary abstract java.lang.String getId(javax.servlet.http.HttpServletRequest request)
This method is used by the WebSphere Dynacache to generate a cache ID.abstract long getLastModified(PortletRequest request)
Returns the time the response of theCacheablePortlet object was last modified, in milliseconds since midnight January 1, 1970 GMT.
int getSharingPolicy(javax.servlet.http.HttpServletRequest request)
This returns the sharing policy used for this cache entry.protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method is used internally to invoke the portlet as a servlet.
Methods inherited from class javax.servlet.http.HttpServlet doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, 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 CacheablePortlet
public CacheablePortlet()
- 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)
- This method is used by the WebSphere Dynacache to generate a cache ID. It must not be overridden by portlets.
- Specified by:
- getId in interface com.ibm.websphere.servlet.cache.CacheableServlet
- 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)
- 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).
- Specified by:
- getSharingPolicy in interface com.ibm.websphere.servlet.cache.CacheableServlet
- Parameters:
- request - The HTTP request object.
- Returns:
- The sharing policy
getLastModified
public abstract long getLastModified(PortletRequest request)
- 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 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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- This method is used internally to invoke the portlet as a servlet. It must not be overridden by portlets.
- Throws:
- javax.servlet.ServletException
- java.io.IOException
Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
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.