OpenNMS API 1.2.9

## org.opennms.web
Class AddRefreshHeaderFilter

    java.lang.Object
      org.opennms.web.AddRefreshHeaderFilter

All Implemented Interfaces:
  javax.servlet.Filter

public class AddRefreshHeaderFilter
extends java.lang.Object
implements javax.servlet.Filter

A filter that adds an HTTP Refresh header to a servlet or JSP's response. The amount of time to wait before refresh is configurable.

Author:
  Lawrence Karnowski , OpenNMS

Field Summary
`protected javax.servlet.FilterConfig` `filterConfig`
`protected java.lang.String` `seconds`

Constructor Summary
`AddRefreshHeaderFilter()`

Method Summary
`void` `destroy()`
`void` `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)` Adds a Refresh HTTP header before processing the request.
`void` `init(javax.servlet.FilterConfig config)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### filterConfig

    protected javax.servlet.FilterConfig filterConfig

### seconds

    protected java.lang.String seconds

Constructor Detail

### AddRefreshHeaderFilter

    public AddRefreshHeaderFilter()

Method Detail

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws java.io.IOException,
                         javax.servlet.ServletException

  Adds a Refresh HTTP header before processing the request.

  This is a strange implementation, because intuitively, you would add the header after the content has been produced (in other words, after you had already called `FilterChain.doFilter`. However, the Servlet 2.3 spec (proposed final draft) states (albeitly in an off-handed fashion) that you can only "examine" the response headers after the `doFilter` call. Evidently this means that you cannot change the headers after the `doFilter`. If you call `setHeader` nothing happens.

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`

### init

    public void init(javax.servlet.FilterConfig config)

  Specified by:
    `init` in interface `javax.servlet.Filter`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.