Class HelixMetadataInterceptor

java.lang.Object
com.helixframework.resttemplate.metadata.HelixMetadataInterceptor
All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor

public class HelixMetadataInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
RestTemplate interceptor that sets the `X-Metadata` header on downstream requests with values found in the helix context.
  • Method Details

    • builder

      public static HelixMetadataInterceptor.Builder builder(com.helixframework.env.HelixEnvironment env)
      Creates a builder for HelixMetadataInterceptor.
      Parameters:
      env - helix environment
      Returns:
      a HelixMetadataInterceptor.Builder
    • 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