Module io.helidon.webclient.context
Package io.helidon.webclient.context
Class WebClientContextService
java.lang.Object
io.helidon.webclient.context.WebClientContextService
- All Implemented Interfaces:
RuntimeType.Api<WebClientContextConfig>,NamedService,WebClientService
public class WebClientContextService
extends Object
implements WebClientService, RuntimeType.Api<WebClientContextConfig>
Client service for context propagation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webclient.spi.WebClientService
WebClientService.Chain -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Fluent API builder to set up an instance.static WebClientContextServiceCreate a new instance from configuration.static WebClientContextServicecreate(WebClientContextConfig config) Create a new instance from its configuration.static WebClientContextServicecreate(Consumer<WebClientContextConfig.Builder> builderConsumer) Create a new instance customizing its configuration.handle(WebClientService.Chain chain, WebClientServiceRequest clientRequest) Invoke a service, callWebClientService.Chain.proceed(io.helidon.webclient.api.WebClientServiceRequest)to call the next service in the chain.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).The prototype as it was received when creating this runtime object instance.type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().
-
Method Details
-
builder
Fluent API builder to set up an instance.- Returns:
- a new builder
-
create
Create a new instance from configuration.- Parameters:
config- configuration- Returns:
- a new service
-
create
Create a new instance from its configuration.- Parameters:
config- configuration- Returns:
- a new service
-
create
public static WebClientContextService create(Consumer<WebClientContextConfig.Builder> builderConsumer) Create a new instance customizing its configuration.- Parameters:
builderConsumer- consumer of configuration- Returns:
- a new service
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Specified by:
namein interfaceWebClientService- Returns:
- name of this service
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceNamedService- Specified by:
typein interfaceWebClientService- Returns:
- type of this service
-
prototype
Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<WebClientContextConfig>- Returns:
- prototype object used to create this instance
-
handle
public WebClientServiceResponse handle(WebClientService.Chain chain, WebClientServiceRequest clientRequest) Description copied from interface:WebClientServiceInvoke a service, callWebClientService.Chain.proceed(io.helidon.webclient.api.WebClientServiceRequest)to call the next service in the chain.- Specified by:
handlein interfaceWebClientService- Parameters:
chain- to invoke next web client service, or the HTTP call if this is the last serviceclientRequest- request from the client, or previous services- Returns:
- response to be returned to the client
-