Package io.helidon.integrations.eureka
Class EurekaRegistrationServerFeature
java.lang.Object
io.helidon.integrations.eureka.EurekaRegistrationServerFeature
- All Implemented Interfaces:
RuntimeType.Api<EurekaRegistrationConfig>,NamedService,Weighted,ServerFeature,Comparable<Weighted>
public final class EurekaRegistrationServerFeature
extends Object
implements RuntimeType.Api<EurekaRegistrationConfig>, ServerFeature, Weighted
A
ServerFeature that automatically and unobtrusively attempts to register the currently running microservice
as a Eureka Server service instance.
Most users will never need to programmatically interact with any of the classes in this package.
- See Also:
-
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 TypeMethodDescriptionbuilder()Returns a builder of the prototype that also knows how to build instances of this runtime type.create(EurekaRegistrationConfig prototype) Creates aEurekaRegistrationServerFeature.create(Consumer<EurekaRegistrationConfig.Builder> builderConsumer) Creates aEurekaRegistrationServerFeature.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).Returns the prototype.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
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
prototype
Returns the prototype.- Specified by:
prototypein interfaceRuntimeType.Api<EurekaRegistrationConfig>- Returns:
- the prototype
-
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
-
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
-
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. -
create
Creates aEurekaRegistrationServerFeature.Most users will never need to programmatically interact with any of the classes in this package.
- Parameters:
prototype- a prototype- Returns:
- a
EurekaRegistrationServerFeature
-
builder
Returns a builder of the prototype that also knows how to build instances of this runtime type.Most users will never need to programmatically interact with any of the classes in this package.
- Returns:
- a builder of the prototype that also knows how to build instances of this runtime type
-
create
public static EurekaRegistrationServerFeature create(Consumer<EurekaRegistrationConfig.Builder> builderConsumer) Creates aEurekaRegistrationServerFeature.Most users will never need to programmatically interact with any of the classes in this package.
- Parameters:
builderConsumer- aConsumerthat updates a suppliedEurekaRegistrationConfig.Builder; must not benull- Returns:
- a non-
nullEurekaRegistrationServerFeature - Throws:
NullPointerException- ifbuilderConsumerisnull- See Also:
-