com.ibm.websphere.servlet.cache

Interface ServletCacheRequest


  1. public interface ServletCacheRequest
This interface is a proxy for the WebSphere request object. It has features added to enable caching.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
getAttribute(java.lang.String key)
This returns the request attribute with the specified key.
  1. java.util.Hashtable
getAttributeTable()
This returns a Hashtable containing the request attributes as they were just prior to exectuion of the entry.
  1. FragmentInfo
getFragmentInfo()
This returns the FragmentInfo for this entry, which contains the caching metadata for the entry.
  1. boolean
getInclude()
This gets the include variable.
  1. boolean
isUncacheable()
This returns true if the page is uncacheable
  1. void
setAttribute(java.lang.String key,java.lang.Object value)
This sets the request attribute key-value pair.
  1. void
setGeneratingId(boolean b)
This method prepares the javax.servlet.ServletInputStream to be read by the IdGenerator.
  1. void
setUncacheable(boolean value)
This sets the page to be uncachebale

Method Detail

getFragmentInfo

  1. FragmentInfo getFragmentInfo()
This returns the FragmentInfo for this entry, which contains the caching metadata for the entry.
Returns:
The caching metadata for this entry.

getInclude

  1. boolean getInclude()
This gets the include variable.
Returns:
True indicates that the include call was used to create this fragment. False indicates that the forward call was used.

getAttributeTable

  1. java.util.Hashtable getAttributeTable( )
This returns a Hashtable containing the request attributes as they were just prior to exectuion of the entry. It also creates the Hashtable if it did not already exist.
Returns:
The hashtable of attributes.

getAttribute

  1. java.lang.Object getAttribute(java.lang.String key)
This returns the request attribute with the specified key. It overrides the method in the WebSphere request.
Parameters:
key - The attribute key.
Returns:
The attribute value.

setAttribute

  1. void setAttribute(java.lang.String key,
  2. java.lang.Object value)
This sets the request attribute key-value pair. It overrides the method in the WebSphere request.
Parameters:
key - The attribute key.
value - The attribute value.

setUncacheable

  1. void setUncacheable(boolean value)
This sets the page to be uncachebale
Parameters:
value - True if the page is to be set as uncacheable

isUncacheable

  1. boolean isUncacheable()
This returns true if the page is uncacheable
Returns:
True indicates that the fragment is uncacheable and false indicates that the fragment is cacheable.

setGeneratingId

  1. void setGeneratingId(boolean b)
This method prepares the javax.servlet.ServletInputStream to be read by the IdGenerator.
 Usage example: 
   servletCacheRequest.setGeneratingId(true);
   InputStream in = servletCacheRequest.getInputStream();
              :
   servletCacheRequest.setGeneratingId(false);
 
Parameters:
b - True or false