Package com.helixframework.okhttp.delta
Class DeltaJsonInterceptor.Builder
java.lang.Object
com.helixframework.okhttp.delta.DeltaJsonInterceptor.Builder
- Enclosing class:
- DeltaJsonInterceptor
Builder for creating
DeltaJsonInterceptor instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the interceptor.cacheKeyStrategy(DeltaCacheKeyStrategy cacheKeyStrategy) Sets the strategy used to derive a cache key from the outbound request.deltaEngine(com.helixframework.delta.DeltaEngine deltaEngine) Sets the delta engine used to compute changed-only JSON.deltaHeaderName(String deltaHeaderName) Sets the header that marks requests whose body has been replaced with a delta projection.Sets the HTTP methods that participate in diff-only body handling.requestBodyStore(DeltaRequestBodyStore requestBodyStore) Sets the request body store used to load and update previous request bodies.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deltaEngine
Sets the delta engine used to compute changed-only JSON.- Parameters:
deltaEngine- delta engine- Returns:
- this builder
-
requestBodyStore
Sets the request body store used to load and update previous request bodies.- Parameters:
requestBodyStore- request body store- Returns:
- this builder
-
cacheKeyStrategy
Sets the strategy used to derive a cache key from the outbound request.- Parameters:
cacheKeyStrategy- cache key strategy- Returns:
- this builder
-
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
Sets the HTTP methods that participate in diff-only body handling.- Parameters:
methods- methods to intercept- Returns:
- this builder
-
build
Builds the interceptor.- Returns:
- a
DeltaJsonInterceptor
-