com.arsdigita.acs
Interface Filter

All Known Implementing Classes:
FilterBase

public interface Filter

Interface for a generic filter, to test incoming requests and screen them out or pass them through as appropriate.

Defines a single method, filter(HttpServletRequest, HttpServletResponse). Implementing classes will check parameters or cookies in the request and may either write to the response output stream directly, or pass the response object on to another request dispatcher.

See Also:
RequestProcessor, FilterBase

Field Summary
static int FILTER_BREAK
          Indicates that the caller should stop procesing the request, and not process any more filters.
static int FILTER_OK
          Indicates the caller should continue procesing the request
static int FILTER_RETURN
          Indicates that the caller should not continue processing the request
 
Method Summary
 int filter(HttpServletRequest req, HttpServletResponse resp, ServletContext ctx)
          The request filter interface.
 String getPath()
          Gets the relative URL path for this Filter.
 int getPriority()
          Gets the priority level for this filter.
 void setPath(String s)
          Sets the relative URL path for this Filter.
 void setPriority(int i)
          Sets the priority level for this Filter.
 

Field Detail

FILTER_RETURN

public static final int FILTER_RETURN
Indicates that the caller should not continue processing the request

FILTER_OK

public static final int FILTER_OK
Indicates the caller should continue procesing the request

FILTER_BREAK

public static final int FILTER_BREAK
Indicates that the caller should stop procesing the request, and not process any more filters.
Method Detail

filter

public int filter(HttpServletRequest req,
                  HttpServletResponse resp,
                  ServletContext ctx)
           throws ACSException
The request filter interface.
Parameters:
req - The servlet request
resp - The servlet response
ctx - The servlet context
Returns:
FILTER_RETURN if the caller should not continue processing the request after the filter is called; FILTER_OK if the caller should continue procesing the request; FILTER_BREAK if the caller should not process any more filters.

setPath

public void setPath(String s)
Sets the relative URL path for this Filter.
Parameters:
s - The path to filter.

getPath

public String getPath()
Gets the relative URL path for this Filter.
Returns:
The relative URL path for this Filter.

setPriority

public void setPriority(int i)
Sets the priority level for this Filter. Lower numbers are higher priority.
Parameters:
i - The priority level

getPriority

public int getPriority()
Gets the priority level for this filter.
Returns:
The priority.