Class w3c.jigsaw.contrib.HeaderFilter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.contrib.HeaderFilter

java.lang.Object
   |
   +----w3c.jigsaw.resources.AttributeHolder
           |
           +----w3c.jigsaw.resources.Resource
                   |
                   +----w3c.jigsaw.resources.ResourceFilter
                           |
                           +----w3c.jigsaw.contrib.HeaderFilter

public class HeaderFilter
extends ResourceFilter
Enforces a specific header value on all replies. Usefull for testing.

Variable Index

 o ATTR_CONNECTION
Attribute index - Should we use connection on that header.
 o ATTR_HEADER_NAME
Attribute index - The header name to add to replies.
 o ATTR_HEADER_VALUE
Attribute index - The header value.
 o ATTR_NOCACHE
Attribute index - SHould we use no-cache on that header.

Constructor Index

 o HeaderFilter()

Method Index

 o checkConnection()
Should we add this header to the connection header.
 o checkNoCache()
Should we add this header's name to the no-cache directive.
 o getHeaderName()
Get the header to set, if any.
 o getHeaderValue()
Get the header value to set, if any.
 o ingoingFilter(Request)
Simplified ingoingFilter API.
 o outgoingFilter(Request, Reply)
The outgoing filter decorates the reply appropriately.

Variables

 o ATTR_HEADER_NAME
  protected static int ATTR_HEADER_NAME
Attribute index - The header name to add to replies.
 o ATTR_HEADER_VALUE
  protected static int ATTR_HEADER_VALUE
Attribute index - The header value.
 o ATTR_NOCACHE
  protected static int ATTR_NOCACHE
Attribute index - SHould we use no-cache on that header.
 o ATTR_CONNECTION
  protected static int ATTR_CONNECTION
Attribute index - Should we use connection on that header.

Constructors

 o HeaderFilter
  public HeaderFilter()

Methods

 o getHeaderName
  public String getHeaderName()
Get the header to set, if any.
Returns:
A String encoded header name, or null.
 o getHeaderValue
  public String getHeaderValue()
Get the header value to set, if any.
Returns:
A String encoded value for the header to set, or null.
 o checkNoCache
  public boolean checkNoCache()
Should we add this header's name to the no-cache directive.
Returns:
A boolean.
 o checkConnection
  public boolean checkConnection()
Should we add this header to the connection header.
Returns:
A boolean.
 o ingoingFilter
  public Reply ingoingFilter(Request request)
Simplified ingoingFilter API.
Overrides:
ingoingFilter in class ResourceFilter
 o outgoingFilter
  public Reply outgoingFilter(Request request,
                              Reply reply)
The outgoing filter decorates the reply appropriately.
Parameters:
request - The original request.
reply - The originial reply.
Returns:
Always null.
Overrides:
outgoingFilter in class ResourceFilter

All Packages  Class Hierarchy  This Package  Previous  Next  Index