com.sun.jersey.api.container.filter
Class PostReplaceFilter

java.lang.Object
  extended by com.sun.jersey.api.container.filter.PostReplaceFilter
All Implemented Interfaces:
ContainerRequestFilter

public class PostReplaceFilter
extends java.lang.Object
implements ContainerRequestFilter

A filter to support HTTP method replacing of a POST request to a request utilizing another HTTP method for the case where proxies or HTTP servers would otherwise block that HTTP method.

This filter may be used to replace a POST request with a PUT or DELETE request.

Replacement will occur if the request method is POST and there exists an a request header "X-HTTP-Method-Override" with a non-empty value. That value will be the HTTP method that replaces the POST method.

TODO support query parameter for declaring the replacing method.

Author:
Paul.Sandoz@Sun.Com

Constructor Summary
PostReplaceFilter()
           
 
Method Summary
 ContainerRequest filter(ContainerRequest request)
          Filter the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostReplaceFilter

public PostReplaceFilter()
Method Detail

filter

public ContainerRequest filter(ContainerRequest request)
Description copied from interface: ContainerRequestFilter
Filter the request.

An implementation may modify the state of the request or create a new instance.

Specified by:
filter in interface ContainerRequestFilter
Parameters:
request - the request.
Returns:
the request.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.