Package org.apache.sling.testing.clients.interceptors

# Class TestDescriptionInterceptor

java.lang.Object
org.apache.sling.testing.clients.interceptors.TestDescriptionInterceptor

All Implemented Interfaces:
  `org.apache.http.HttpRequestInterceptor`

public class TestDescriptionInterceptor extends Object implements org.apache.http.HttpRequestInterceptor
HttpClient interceptor that propagates the current test name as part HTTP request headers. Headers can then be logged, exported as MDC info etc. by `TestNameLoggingFilter`. Meant to help in correlating the server side logs with the test case being executed.

See Also:
  - `http://www.slf4j.org/manual.html`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`TEST_CLASS_HEADER`
`static final String`
`TEST_NAME_HEADER`

## Constructor Summary

Constructors
Constructor
Description
`TestDescriptionInterceptor()`

## Method Summary

Modifier and Type
Method
Description
`void`
`process(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### TEST_CLASS_HEADER

public static final String TEST_CLASS_HEADER

See Also:
  - Constant Field Values

### TEST_NAME_HEADER

public static final String TEST_NAME_HEADER

See Also:
  - Constant Field Values

## Constructor Details

### TestDescriptionInterceptor

public TestDescriptionInterceptor()

## Method Details

### process

public void process(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext) throws org.apache.http.HttpException, IOException

Specified by:
  `process` in interface `org.apache.http.HttpRequestInterceptor`
Throws:
  `org.apache.http.HttpException`
  `IOException`