com.ibm.websphere.servlet.cache

Interface DynamicContentProvider


  1. public interface DynamicContentProvider
Implement this interface in your Servlet or JSP to have a callback invoked during cache hits. This will allow Dynamic Cache to imbed your dynamic content within a cached fragment.

Method Summary

Modifier and Type Method and Description
  1. void
provideDynamicContent(HttpServletRequest request,java.io.OutputStream streamWriter)
This method generates and writes the dynamic content to the OutputStream.
  1. void
provideDynamicContent(HttpServletRequest request,java.io.Writer streamWriter)
This method generates and writes the dynamic content to the Writer.

Method Detail

provideDynamicContent

  1. void provideDynamicContent(HttpServletRequest request,
  2. java.io.OutputStream streamWriter)
  3. throws java.io.IOException
This method generates and writes the dynamic content to the OutputStream. It is called on a cache hit or miss to generate the dynamic content of the cacheable servlet.
Parameters:
request - The HttpServletRequest to determin what dynamic content to create.
streamWriter - The OutputStream that this method will write the dynamic content to.
Throws:
java.io.IOException

provideDynamicContent

  1. void provideDynamicContent(HttpServletRequest request,
  2. java.io.Writer streamWriter)
  3. throws java.io.IOException
This method generates and writes the dynamic content to the Writer. It is called on a cache hit or miss to generate the dynamic content of the cacheable servlet.
Parameters:
request - The HttpServletRequest to determin what dynamic content to create.
streamWriter - The Writer that this method will write the dynamic content to.
Throws:
java.io.IOException