Class DeltaJsonInterceptor.Builder

java.lang.Object
com.helixframework.okhttp.delta.DeltaJsonInterceptor.Builder
Enclosing class:
DeltaJsonInterceptor

public static class DeltaJsonInterceptor.Builder extends Object
Builder for creating DeltaJsonInterceptor instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • deltaEngine

      public DeltaJsonInterceptor.Builder deltaEngine(com.helixframework.delta.DeltaEngine deltaEngine)
      Sets the delta engine used to compute changed-only JSON.
      Parameters:
      deltaEngine - delta engine
      Returns:
      this builder
    • requestBodyStore

      public DeltaJsonInterceptor.Builder requestBodyStore(DeltaRequestBodyStore requestBodyStore)
      Sets the request body store used to load and update previous request bodies.
      Parameters:
      requestBodyStore - request body store
      Returns:
      this builder
    • cacheKeyStrategy

      public DeltaJsonInterceptor.Builder cacheKeyStrategy(DeltaCacheKeyStrategy cacheKeyStrategy)
      Sets the strategy used to derive a cache key from the outbound request.
      Parameters:
      cacheKeyStrategy - cache key strategy
      Returns:
      this builder
    • deltaHeaderName

      public DeltaJsonInterceptor.Builder deltaHeaderName(String deltaHeaderName)
      Sets the header that marks requests whose body has been replaced with a delta projection.
      Parameters:
      deltaHeaderName - delta header name
      Returns:
      this builder
    • methods

      public DeltaJsonInterceptor.Builder methods(Set<String> methods)
      Sets the HTTP methods that participate in diff-only body handling.
      Parameters:
      methods - methods to intercept
      Returns:
      this builder
    • build

      public DeltaJsonInterceptor build()
      Builds the interceptor.
      Returns:
      a DeltaJsonInterceptor