Class BusinessTransactionIdSupplierHttpRequestInterceptor
- java.lang.Object
-
- org.hawaiiframework.logging.http.client.BusinessTransactionIdSupplierHttpRequestInterceptor
-
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class BusinessTransactionIdSupplierHttpRequestInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
HTTP request interceptor to set a business transaction id as a header on an HTTP request. A business transaction id can be any (UUID) value a caller to a service wishes to supply.
-
-
Constructor Summary
Constructors Constructor Description BusinessTransactionIdSupplierHttpRequestInterceptor()
Default constructor with 'X-Hawaii-Business-Tx-Id' asheadername
.BusinessTransactionIdSupplierHttpRequestInterceptor(String headerName)
Constructor that sets the header name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.client.ClientHttpResponse
intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution)
-
-
-
Constructor Detail
-
BusinessTransactionIdSupplierHttpRequestInterceptor
public BusinessTransactionIdSupplierHttpRequestInterceptor()
Default constructor with 'X-Hawaii-Business-Tx-Id' asheadername
.
-
BusinessTransactionIdSupplierHttpRequestInterceptor
public BusinessTransactionIdSupplierHttpRequestInterceptor(String headerName)
Constructor that sets the header name.- Parameters:
headerName
- The header name to use.
-
-
Method Detail
-
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:
intercept
in interfaceorg.springframework.http.client.ClientHttpRequestInterceptor
- Throws:
IOException
-
-