Rakesh API

org.rakeshv.filters
Class CachingFilter.FileProperties

java.lang.Object
  extended by org.rakeshv.filters.CachingFilter.FileProperties
Enclosing class:
CachingFilter

public class CachingFilter.FileProperties
extends java.lang.Object

A data structure for storing the HTTP headers specified for the response that is being cached. These will be used when returning the cached version of a response.


Field Summary
private  java.lang.String characterEncoding
          The character-encoding header value.
private  java.lang.String contentType
          The content-type header value.
private  java.lang.String fileName
          The fully qualified name of the cache file.
private  java.util.Map headers
          A map to hold all the additional header's specified for the response.
private  java.util.Locale locale
          The locale header value.
private  boolean validResponse
          A flag that indicates whether the cache file generated for the request should be treated as valid.
 
Constructor Summary
protected CachingFilter.FileProperties()
          Default constructor.
protected CachingFilter.FileProperties(java.lang.String fileName)
          Create a new instance with the specified fileName.
protected CachingFilter.FileProperties(java.lang.String fileName, java.lang.String characterEncoding, java.lang.String contentType, java.util.Locale locale)
          Create a new instance with the specified values.
 
Method Summary
 java.lang.String getCharacterEncoding()
          Returns characterEncoding.
 java.lang.String getContentType()
          Returns contentType.
 java.lang.String getFileName()
          Returns fileName.
 java.util.Map getHeaders()
          Returns headers.
 java.util.Locale getLocale()
          Returns locale.
 boolean getValidResponse()
          Returns validResponse.
protected  void setCharacterEncoding(java.lang.String characterEncoding)
          Set characterEncoding.
protected  void setContentType(java.lang.String contentType)
          Set contentType.
protected  void setFileName(java.lang.String fileName)
          Set fileName.
 void setHeader(java.lang.String name, java.lang.String value)
          Add or modify the specified header with the value specified.
protected  void setHeaders(java.util.Map headers)
          Set headers.
protected  void setHeadersFromFields(javax.servlet.ServletResponse response)
          Set the HTTP header values denoting the type of content being returned from the values stored in the instance members.
protected  void setLocale(java.util.Locale locale)
          Set locale.
protected  void setValidResponse(boolean validResponse)
          Set validResponse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

private java.lang.String fileName
The fully qualified name of the cache file.


characterEncoding

private java.lang.String characterEncoding
The character-encoding header value.


contentType

private java.lang.String contentType
The content-type header value.


locale

private java.util.Locale locale
The locale header value.


validResponse

private boolean validResponse
A flag that indicates whether the cache file generated for the request should be treated as valid. This is set to false when any response other than a SC_OK is returned for the request.


headers

private java.util.Map headers
A map to hold all the additional header's specified for the response.

Constructor Detail

CachingFilter.FileProperties

protected CachingFilter.FileProperties()
Default constructor. Not meant for public use.


CachingFilter.FileProperties

protected CachingFilter.FileProperties(java.lang.String fileName)
Create a new instance with the specified fileName.

Parameters:
fileName - The fileName value to set.
See Also:
setFileName(java.lang.String)

CachingFilter.FileProperties

protected CachingFilter.FileProperties(java.lang.String fileName,
                                       java.lang.String characterEncoding,
                                       java.lang.String contentType,
                                       java.util.Locale locale)
Create a new instance with the specified values.

Parameters:
fileName - The fileName value to set.
characterEncoding - The characterEncoding value to set.
contentType - The contentType value to set.
locale - The locale value to set.
See Also:
setFileName(java.lang.String), setCharacterEncoding(java.lang.String), setContentType(java.lang.String), setLocale(java.util.Locale)
Method Detail

setHeadersFromFields

protected void setHeadersFromFields(javax.servlet.ServletResponse response)
Set the HTTP header values denoting the type of content being returned from the values stored in the instance members.

Parameters:
response - The HTTP response whose content attributes are to be set.

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
Add or modify the specified header with the value specified.

Parameters:
name - The name of the header
value - The value of the header

getFileName

public final java.lang.String getFileName()
Returns fileName.

Returns:
String The value/reference of/to fileName.

setFileName

protected final void setFileName(java.lang.String fileName)
Set fileName.

Parameters:
fileName - The value to set.

getCharacterEncoding

public final java.lang.String getCharacterEncoding()
Returns characterEncoding.

Returns:
String The value/reference of/to characterEncoding.

setCharacterEncoding

protected final void setCharacterEncoding(java.lang.String characterEncoding)
Set characterEncoding.

Parameters:
characterEncoding - The value to set.

getContentType

public final java.lang.String getContentType()
Returns contentType.

Returns:
String The value/reference of/to contentType.

setContentType

protected final void setContentType(java.lang.String contentType)
Set contentType.

Parameters:
contentType - The value to set.

getLocale

public final java.util.Locale getLocale()
Returns locale.

Returns:
Locale The value/reference of/to locale.

setLocale

protected final void setLocale(java.util.Locale locale)
Set locale.

Parameters:
locale - The value to set.

getValidResponse

public final boolean getValidResponse()
Returns validResponse.

Returns:
boolean The value/reference of/to validResponse.

setValidResponse

protected final void setValidResponse(boolean validResponse)
Set validResponse.

Parameters:
validResponse - The value to set.

getHeaders

public final java.util.Map getHeaders()
Returns headers.

Returns:
Map The value/reference of/to headers.

setHeaders

protected final void setHeaders(java.util.Map headers)
Set headers.

Parameters:
headers - The value to set.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan