Class LoggingClientInterceptor

java.lang.Object
org.citrusframework.http.interceptor.LoggingClientInterceptor
All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor

public class LoggingClientInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
Simple logging interceptor writes Http request and response messages to the console.
Since:
1.2
Author:
Christoph Deppisch
  • Constructor Details

    • LoggingClientInterceptor

      public LoggingClientInterceptor()
  • 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:
      intercept in interface org.springframework.http.client.ClientHttpRequestInterceptor
      Throws:
      IOException
    • handleRequest

      public void handleRequest(String request)
      Handles request messages for logging.
      Parameters:
      request -
    • handleResponse

      public void handleResponse(String response)
      Handles response messages for logging.
      Parameters:
      response -
    • hasMessageListeners

      public boolean hasMessageListeners()
      Checks if message listeners are present on this interceptor.
      Returns:
    • setMessageListener

      public void setMessageListener(MessageListeners messageListener)
      Sets the message listener.
      Parameters:
      messageListener -