ch.hsr.bieridee.test.http.requestprocessors
Class AcceptRequestProcessor

java.lang.Object
  extended by ch.hsr.bieridee.test.http.requestprocessors.AcceptRequestProcessor
All Implemented Interfaces:
IRequestProcessor

public class AcceptRequestProcessor
extends java.lang.Object
implements IRequestProcessor

A request processor that takes a content type in the constructor and adds it to the accept header of the request.


Nested Class Summary
static class AcceptRequestProcessor.ContentType
          Content type enum.
 
Constructor Summary
AcceptRequestProcessor(AcceptRequestProcessor.ContentType contentType)
          Create a new AcceptRequestProcessor instance that adds the specified ContentType to the accept header of the request.
 
Method Summary
 org.apache.http.client.methods.HttpRequestBase processRequest(org.apache.http.client.methods.HttpRequestBase request)
          Process the request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptRequestProcessor

public AcceptRequestProcessor(AcceptRequestProcessor.ContentType contentType)
Create a new AcceptRequestProcessor instance that adds the specified ContentType to the accept header of the request.

Parameters:
contentType - An instance of AcceptRequestProcessor.ContentType
Method Detail

processRequest

public org.apache.http.client.methods.HttpRequestBase processRequest(org.apache.http.client.methods.HttpRequestBase request)
Process the request.

Specified by:
processRequest in interface IRequestProcessor
Parameters:
request - HTTP request object
Returns:
HTTP request object