Package feign
Class VertxFeign.Builder
- java.lang.Object
-
- feign.Feign.Builder
-
- feign.VertxFeign.Builder
-
- Enclosing class:
- VertxFeign
public static final class VertxFeign.Builder extends feign.Feign.BuilderVertxFeign builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VertxFeignbuild()VertxFeign.Builderclient(feign.Client client)Unsupported operation.VertxFeign.Buildercontract(feign.Contract contract)Sets contract.VertxFeign.Builderdecode404()This flag indicates that thedecodershould process responses with 404 status, specifically returning null or empty instead of throwingFeignException.VertxFeign.Builderdecoder(feign.codec.Decoder decoder)Sets decoder.VertxFeign.Builderencoder(feign.codec.Encoder encoder)Sets encoder.VertxFeign.BuildererrorDecoder(feign.codec.ErrorDecoder errorDecoder)Sets error decoder.VertxFeign.BuilderinvocationHandlerFactory(feign.InvocationHandlerFactory invocationHandlerFactory)Unsupported operation.VertxFeign.Builderlogger(feign.Logger logger)Sets logger.VertxFeign.BuilderlogLevel(feign.Logger.Level logLevel)Sets log level.VertxFeign.Builderoptions(feign.Request.Options options)Sets request options using FeignRequest.Options.VertxFeign.Builderoptions(io.vertx.core.http.HttpClientOptions options)Sets request options using Vert.xHttpClientOptions.VertxFeign.BuilderrequestInterceptor(feign.RequestInterceptor requestInterceptor)Adds a single request interceptor to the builder.VertxFeign.BuilderrequestInterceptors(Iterable<feign.RequestInterceptor> requestInterceptors)Sets the full set of request interceptors for the builder, overwriting any previous interceptors.VertxFeign.Builderretryer(feign.Retryer retryer)Sets retryer.<T> Ttarget(feign.Target<T> target)Defines target and builds client.<T> Ttarget(Class<T> apiType, String url)Defines target and builds client.VertxFeign.Buildervertx(io.vertx.core.Vertx vertx)Sets a vertx instance to use to make the client.
-
-
-
Method Detail
-
client
public VertxFeign.Builder client(feign.Client client)
Unsupported operation.- Overrides:
clientin classfeign.Feign.Builder
-
invocationHandlerFactory
public VertxFeign.Builder invocationHandlerFactory(feign.InvocationHandlerFactory invocationHandlerFactory)
Unsupported operation.- Overrides:
invocationHandlerFactoryin classfeign.Feign.Builder
-
vertx
public VertxFeign.Builder vertx(io.vertx.core.Vertx vertx)
Sets a vertx instance to use to make the client.- Parameters:
vertx- vertx instance- Returns:
- this builder
-
logLevel
public VertxFeign.Builder logLevel(feign.Logger.Level logLevel)
Sets log level.- Overrides:
logLevelin classfeign.Feign.Builder- Parameters:
logLevel- log level- Returns:
- this builder
-
contract
public VertxFeign.Builder contract(feign.Contract contract)
Sets contract. Provided contract will be wrapped inVertxDelegatingContract.- Overrides:
contractin classfeign.Feign.Builder- Parameters:
contract- contract- Returns:
- this builder
-
retryer
public VertxFeign.Builder retryer(feign.Retryer retryer)
Sets retryer.- Overrides:
retryerin classfeign.Feign.Builder- Parameters:
retryer- retryer- Returns:
- this builder
-
logger
public VertxFeign.Builder logger(feign.Logger logger)
Sets logger.- Overrides:
loggerin classfeign.Feign.Builder- Parameters:
logger- logger- Returns:
- this builder
-
encoder
public VertxFeign.Builder encoder(feign.codec.Encoder encoder)
Sets encoder.- Overrides:
encoderin classfeign.Feign.Builder- Parameters:
encoder- encoder- Returns:
- this builder
-
decoder
public VertxFeign.Builder decoder(feign.codec.Decoder decoder)
Sets decoder.- Overrides:
decoderin classfeign.Feign.Builder- Parameters:
decoder- decoder- Returns:
- this builder
-
decode404
public VertxFeign.Builder decode404()
This flag indicates that thedecodershould process responses with 404 status, specifically returning null or empty instead of throwingFeignException.All first-party (ex gson) decoders return well-known empty values defined by
Util.emptyValueOf(java.lang.reflect.Type). To customize further, wrap an existingdecoderor make your own.This flag only works with 404, as opposed to all or arbitrary status codes. This was an explicit decision: 404 - empty is safe, common and doesn't complicate redirection, retry or fallback policy.
- Overrides:
decode404in classfeign.Feign.Builder- Returns:
- this builder
-
errorDecoder
public VertxFeign.Builder errorDecoder(feign.codec.ErrorDecoder errorDecoder)
Sets error decoder.- Overrides:
errorDecoderin classfeign.Feign.Builder- Parameters:
errorDecoder- error deoceder- Returns:
- this builder
-
options
public VertxFeign.Builder options(io.vertx.core.http.HttpClientOptions options)
Sets request options using Vert.xHttpClientOptions.- Parameters:
options-HttpClientOptionsfor full customization of the underlying Vert.xHttpClient- Returns:
- this builder
-
options
public VertxFeign.Builder options(feign.Request.Options options)
Sets request options using FeignRequest.Options.- Overrides:
optionsin classfeign.Feign.Builder- Parameters:
options- FeignRequest.Optionsobject- Returns:
- this builder
-
requestInterceptor
public VertxFeign.Builder requestInterceptor(feign.RequestInterceptor requestInterceptor)
Adds a single request interceptor to the builder.- Overrides:
requestInterceptorin classfeign.Feign.Builder- Parameters:
requestInterceptor- request interceptor to add- Returns:
- this builder
-
requestInterceptors
public VertxFeign.Builder requestInterceptors(Iterable<feign.RequestInterceptor> requestInterceptors)
Sets the full set of request interceptors for the builder, overwriting any previous interceptors.- Overrides:
requestInterceptorsin classfeign.Feign.Builder- Parameters:
requestInterceptors- set of request interceptors- Returns:
- this builder
-
target
public <T> T target(Class<T> apiType, String url)
Defines target and builds client.- Overrides:
targetin classfeign.Feign.Builder- Type Parameters:
T- class of API interface- Parameters:
apiType- API interfaceurl- base URL- Returns:
- built client
-
target
public <T> T target(feign.Target<T> target)
Defines target and builds client.- Overrides:
targetin classfeign.Feign.Builder- Type Parameters:
T- class of API interface- Parameters:
target- target instance- Returns:
- built client
-
build
public VertxFeign build()
- Overrides:
buildin classfeign.Feign.Builder
-
-