java.lang.Object
io.helidon.webserver.observe.ObserveFeature
- All Implemented Interfaces:
RuntimeType.Api<ObserveFeatureConfig>,NamedService,Weighted,ServerFeature,Comparable<Weighted>
public class ObserveFeature
extends Object
implements ServerFeature, Weighted, RuntimeType.Api<ObserveFeatureConfig>
Support for all observe providers that are available (or configured).
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerFeature
ServerFeature.RoutingBuilders, ServerFeature.ServerFeatureContext, ServerFeature.SocketBuilders -
Field Summary
Fields inherited from interface io.helidon.common.Weighted
DEFAULT_WEIGHT -
Method Summary
Modifier and TypeMethodDescriptionstatic ObserveFeatureConfig.Builderbuilder()A new builder to customize observe support.static ObserveFeaturecreate()Create a new support with default configuration and a list of providers discovered byServiceLoader.static ObserveFeatureCreate a new support with custom configuration.static ObserveFeaturecreate(ObserveFeatureConfig config) Create a new observe feature based on its configuration.static ObserveFeatureCreate a new support with default configuration and an explicit list of observers.static ObserveFeaturecreate(Consumer<ObserveFeatureConfig.Builder> consumer) Create a new observe feature customizing its configuration.static ObserveFeatureCreate a new support with default configuration and an explicit list of observers.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).The prototype as it was received when creating this runtime object instance.voidsetup(ServerFeature.ServerFeatureContext featureContext) Set up a server feature.type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().doubleweight()Weight of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation).
-
Method Details
-
builder
A new builder to customize observe support.- Returns:
- a new builder
-
create
Create a new observe feature customizing its configuration.- Parameters:
consumer- configuration consumer- Returns:
- a new observe feature
-
create
Create a new observe feature based on its configuration.- Parameters:
config- configuration- Returns:
- a new observe feature
-
just
Create a new support with default configuration and an explicit list of observers. This will NOT use providers discovered byServiceLoader.- Parameters:
observers- observer to use- Returns:
- a new observe support
-
create
Create a new support with default configuration and an explicit list of observers. This will use providers discovered byServiceLoader.- Parameters:
observers- observer to use- Returns:
- a new observe support
-
create
Create a new support with default configuration and a list of providers discovered byServiceLoader.- Returns:
- a new observe support
-
create
Create a new support with custom configuration.- Parameters:
config- configuration to read observe config from- Returns:
- a new observe support
-
prototype
Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<ObserveFeatureConfig>- Returns:
- prototype object used to create this instance
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- 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- Returns:
- type of this service
-
setup
Description copied from interface:ServerFeatureSet up a server feature. Server features can modify server configuration, right before the server is created. To access listener configuration, or routing, a list of all listeners is provided.- Specified by:
setupin interfaceServerFeature- Parameters:
featureContext- to access builders of webserver, listeners, and routing
-
weight
public double weight()Description copied from interface:WeightedWeight of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation). If not dynamic, you can use theWeightannotation rather than implementing this interface as long as it is supported by the library using thisWeighted.
-