java.lang.Object
io.helidon.webserver.context.ContextFeature
- All Implemented Interfaces:
io.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>,io.helidon.common.config.NamedService,io.helidon.common.Weighted,ServerFeature,Comparable<io.helidon.common.Weighted>
public class ContextFeature
extends Object
implements io.helidon.common.Weighted, ServerFeature, io.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>
Adds
Context support to Helidon WebServer.
When added to the processing, further processing will be executed in a request specific context.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerFeature
ServerFeature.RoutingBuilders, ServerFeature.ServerFeatureContext, ServerFeature.SocketBuilders -
Field Summary
FieldsFields inherited from interface io.helidon.common.Weighted
DEFAULT_WEIGHT -
Method Summary
Modifier and TypeMethodDescriptionstatic ContextFeatureConfig.Builderbuilder()Fluent API builder to set up an instance.static ContextFeaturecreate()Create a new context feature with default setup.static ContextFeaturecreate(io.helidon.config.Config config) Create a new context feature with custom setup.static ContextFeaturecreate(ContextFeatureConfig config) Create a new instance from its configuration.static ContextFeaturecreate(Consumer<ContextFeatureConfig.Builder> builderConsumer) Create a new instance customizing its configuration.name()voidsetup(ServerFeature.ServerFeatureContext featureContext) type()doubleweight()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.common.Weighted
compareTo
-
Field Details
-
WEIGHT
public static final double WEIGHTDefault weight of the feature. It is quite high, as context is used by a lot of other features.- See Also:
-
-
Method Details
-
builder
Fluent API builder to set up an instance.- Returns:
- a new builder
-
create
Create a new instance from its configuration.- Parameters:
config- configuration- Returns:
- a new feature
-
create
Create a new instance customizing its configuration.- Parameters:
builderConsumer- consumer of configuration- Returns:
- a new feature
-
create
Create a new context feature with default setup.- Returns:
- a new feature
-
create
Create a new context feature with custom setup.- Parameters:
config- configuration- Returns:
- a new configured feature
-
setup
- Specified by:
setupin interfaceServerFeature
-
name
- Specified by:
namein interfaceio.helidon.common.config.NamedService
-
type
- Specified by:
typein interfaceio.helidon.common.config.NamedService
-
prototype
- Specified by:
prototypein interfaceio.helidon.builder.api.RuntimeType.Api<ContextFeatureConfig>
-
weight
public double weight()- Specified by:
weightin interfaceio.helidon.common.Weighted
-