Class ConfigObserver
java.lang.Object
io.helidon.webserver.observe.config.ConfigObserver
- All Implemented Interfaces:
RuntimeType.Api<io.helidon.webserver.observe.config.ConfigObserverConfig>,NamedService,Observer
public class ConfigObserver
extends Object
implements Observer, RuntimeType.Api<io.helidon.webserver.observe.config.ConfigObserverConfig>
Config Observer configuration.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.helidon.webserver.observe.config.ConfigObserverConfig.Builderbuilder()Create a new builder to configure Config observer.static ConfigObservercreate()Create a new Config observer with default configuration.static ConfigObservercreate(io.helidon.webserver.observe.config.ConfigObserverConfig config) Create a new Config observer using the provided configuration.static ConfigObserverCreate a new Config observer customizing its configuration.io.helidon.webserver.observe.config.ConfigObserverConfigConfiguration of this observer.voidregister(ServerFeature.ServerFeatureContext featureContext, List<HttpRouting.Builder> observeEndpointRouting, UnaryOperator<String> endpointFunction) Register the observer features, services, and/or filters.type()Type of this observer, to make sure we do not configure an observer both fromServiceLoaderand using programmatic approach.
-
Method Details
-
builder
public static io.helidon.webserver.observe.config.ConfigObserverConfig.Builder builder()Create a new builder to configure Config observer.- Returns:
- a new builder
-
create
public static ConfigObserver create(io.helidon.webserver.observe.config.ConfigObserverConfig config) Create a new Config observer using the provided configuration.- Parameters:
config- configuration- Returns:
- a new observer
-
create
public static ConfigObserver create(Consumer<io.helidon.webserver.observe.config.ConfigObserverConfig.Builder> consumer) Create a new Config observer customizing its configuration.- Parameters:
consumer- configuration consumer- Returns:
- a new observer
-
create
Create a new Config observer with default configuration.- Returns:
- a new observer
-
prototype
public io.helidon.webserver.observe.config.ConfigObserverConfig prototype()Description copied from interface:ObserverConfiguration of this observer.- Specified by:
prototypein interfaceObserver- Specified by:
prototypein interfaceRuntimeType.Api<io.helidon.webserver.observe.config.ConfigObserverConfig>- Returns:
- configuration of the observer
-
type
Description copied from interface:ObserverType of this observer, to make sure we do not configure an observer both fromServiceLoaderand using programmatic approach. If it is desired to have more than one observer of the same type, always use programmatic approach- Specified by:
typein interfaceNamedService- Specified by:
typein interfaceObserver- Returns:
- type of this observer, should match
ObserveProvider.type()
-
register
public void register(ServerFeature.ServerFeatureContext featureContext, List<HttpRouting.Builder> observeEndpointRouting, UnaryOperator<String> endpointFunction) Description copied from interface:ObserverRegister the observer features, services, and/or filters. This is used by the observe feature. Do NOT use this method directly, kindly start withObserveFeatureand register it with the server builder.- Specified by:
registerin interfaceObserver- Parameters:
featureContext- access to all routing builders, for cases where this observer needs to register additional components to other socketsobserveEndpointRouting- routing builders that expose observability endpoints, and this feature must use these to register any endpoints exposed for observabilityendpointFunction- function to obtain the final endpoint for observers that expose observe endpoints (such as/observe/healthwould be provider forhealthby default)
-