public class

LastModifiedHandler

extends Object
java.lang.Object
   ↳ com.atlassian.plugin.servlet.util.LastModifiedHandler
Known Direct Subclasses

Class Overview

This class manages the last modified date of a single HTTP resource.

Summary

Public Constructors
LastModifiedHandler()
LastModifiedHandler(Date lastModifiedDate)
Public Methods
boolean checkRequest(HttpServletRequest request, HttpServletResponse response)
Check whether we need to generate a response for this request.
static boolean checkRequest(HttpServletRequest request, HttpServletResponse response, Date lastModifiedDate)
This static method is used when the resource being served by the servlet keeps track of the last modified date, and so no state needs to be maintained by this handler.
void modified()
The content has changed, reset the modified date and the etag
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LastModifiedHandler ()

public LastModifiedHandler (Date lastModifiedDate)

Public Methods

public boolean checkRequest (HttpServletRequest request, HttpServletResponse response)

Check whether we need to generate a response for this request. Set the necessary headers on the response, and if we don't need to provide content, set the response status to 304. If this method returns true, the caller should not perform any more processing on the request.

Returns
  • true if we don't need to provide any data to satisfy this request

public static boolean checkRequest (HttpServletRequest request, HttpServletResponse response, Date lastModifiedDate)

This static method is used when the resource being served by the servlet keeps track of the last modified date, and so no state needs to be maintained by this handler.

public void modified ()

The content has changed, reset the modified date and the etag