Class DeferringLoadBalancerInterceptor

java.lang.Object
org.springframework.cloud.client.loadbalancer.DeferringLoadBalancerInterceptor
All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor

public class DeferringLoadBalancerInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
An ClientHttpRequestInterceptor implementation that uses ObjectProvider to resolve appropriate BlockingLoadBalancerInterceptor delegate when the ClientHttpRequestInterceptor.intercept(HttpRequest, byte[], ClientHttpRequestExecution) method is first called.
Since:
4.1.2
Author:
Olga Maciaszek-Sharma
  • Constructor Summary

    Constructors
    Constructor
    Description
    DeferringLoadBalancerInterceptor(org.springframework.beans.factory.ObjectProvider<BlockingLoadBalancerInterceptor> loadBalancerInterceptorProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.client.ClientHttpResponse
    intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution)
     

    Methods inherited from class Object

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

    Methods inherited from interface org.springframework.http.client.ClientHttpRequestInterceptor

    andThen, apply
  • Constructor Details

    • DeferringLoadBalancerInterceptor

      public DeferringLoadBalancerInterceptor(org.springframework.beans.factory.ObjectProvider<BlockingLoadBalancerInterceptor> loadBalancerInterceptorProvider)
  • 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