com.ibm.wps.pe.pc.legacy.cache
Class CacheablePortlet
java.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:
- org.apache.jetspeed.portlet.Portlet
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 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
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(org.apache.jetspeed.portlet.PortletRequest request)
Deprecated. Return 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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. 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 |
CacheablePortlet
public CacheablePortlet()
- Deprecated.
- Default constructor. This constructor must not be called by application code.
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.
- 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)
- 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).
- 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(org.apache.jetspeed.portlet.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 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
- Deprecated.
- This method is used internally to invoke the portlet as a servlet. It must
not be overridden by portlets.
- Overrides:
- service in class javax.servlet.http.HttpServlet
- Throws:
- javax.servlet.ServletException
- java.io.IOException