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 WebClientContextService
Create a new instance from configuration.static WebClientContextService
create
(WebClientContextConfig config) Create a new instance from its configuration.static WebClientContextService
create
(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:NamedService
Name of this implementation, as provided inConfiguredProvider.create(Config, String)
.- Specified by:
name
in interfaceNamedService
- Specified by:
name
in interfaceWebClientService
- Returns:
- name of this service
-
type
Description copied from interface:NamedService
Type of this implementation, to distinguish instances of same type, with differentNamedService.name()
. Use for exampleConfiguredProvider.configKey()
to define the type.- Specified by:
type
in interfaceNamedService
- Specified by:
type
in interfaceWebClientService
- Returns:
- type of this service
-
prototype
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<WebClientContextConfig>
- Returns:
- prototype object used to create this instance
-
handle
public WebClientServiceResponse handle(WebClientService.Chain chain, WebClientServiceRequest clientRequest) Description copied from interface:WebClientService
Invoke a service, callWebClientService.Chain.proceed(io.helidon.webclient.api.WebClientServiceRequest)
to call the next service in the chain.- Specified by:
handle
in 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
-