org.directwebremoting.servlet
Class CachingHandler

java.lang.Object
  extended by org.directwebremoting.servlet.CachingHandler
All Implemented Interfaces:
Handler
Direct Known Subclasses:
TemplateHandler

public abstract class CachingHandler
extends java.lang.Object
implements Handler

A handler that deals with ETags and other nonsense to do with keeping a browsers cache in-sync with a web server.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
CachingHandler()
           
 
Method Summary
 java.lang.String getMimeType()
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle a URL request that has been mapped to this Handler
 void setIgnoreLastModified(boolean ignoreLastModified)
           
 void setMimeType(java.lang.String mimeType)
          The mime type to send the output under
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingHandler

public CachingHandler()
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException
Description copied from interface: Handler
Handle a URL request that has been mapped to this Handler

Specified by:
handle in interface Handler
Parameters:
request - The HTTP request data
response - Where we write the HTTP response data
Throws:
java.io.IOException - If the write process fails

setIgnoreLastModified

public void setIgnoreLastModified(boolean ignoreLastModified)
Parameters:
ignoreLastModified - The ignoreLastModified to set.

setMimeType

public void setMimeType(java.lang.String mimeType)
The mime type to send the output under

Parameters:
mimeType - the mimeType to set

getMimeType

public java.lang.String getMimeType()
Returns:
the current mime type

Copyright 2008