javax.portlet.filter
Interface ResourceFilter

All Superinterfaces:
PortletFilter

public interface ResourceFilter
extends PortletFilter

The ResourceFilter is an object that performs filtering tasks on either the resource request to a portlet, or on the resource response from a portlet, or both.

Filters perform filtering in the doFilter method. Every Filter has access to a FilterConfig object from which it can obtain its initialization parameters, a reference to the PortletContext which it can use, for example, to load resources needed for filtering tasks.

Filters are configured in the portlet deployment descriptor of a portlet application.

Since:
2.0

Method Summary
 void doFilter(ResourceRequest request, ResourceResponse response, FilterChain chain)
          The doFilter method of the Filter is called by the portlet container each time a resource request/response pair is passed through the chain due to a client request for a portlet method at the end of the chain.
 
Methods inherited from interface javax.portlet.filter.PortletFilter
destroy, init
 

Method Detail

doFilter

void doFilter(ResourceRequest request,
              ResourceResponse response,
              FilterChain chain)
              throws java.io.IOException,
                     PortletException
The doFilter method of the Filter is called by the portlet container each time a resource request/response pair is passed through the chain due to a client request for a portlet method at the end of the chain.

The FilterChain passed in to this method allows the Filter to pass on the resource request and response to the next component in the chain.

The doFilter method of a filter will typically be implemented following this or some subset of the following pattern:

Parameters:
request - the current resource request
response - the current resource response
chain - the remaining filter chain
Throws:
java.io.IOException - if an IO error occurred in the filter processing
PortletException - if a portlet exception occurred in the filter processing