Class TransactionIdSupplierHttpRequestInterceptor
java.lang.Object
org.hawaiiframework.logging.http.client.TransactionIdSupplierHttpRequestInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class TransactionIdSupplierHttpRequestInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
HTTP request interceptor to set a transaction id as a header on an HTTP request.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with 'X-Hawaii-Tx-Id' asheadername.TransactionIdSupplierHttpRequestInterceptor(String headerName) Constructor that sets the header name. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution)
-
Constructor Details
-
TransactionIdSupplierHttpRequestInterceptor
public TransactionIdSupplierHttpRequestInterceptor()Default constructor with 'X-Hawaii-Tx-Id' asheadername. -
TransactionIdSupplierHttpRequestInterceptor
Constructor that sets the header name.- Parameters:
headerName- The header name to use.
-
-
Method Details
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException - Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Throws:
IOException
-