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.void
setup
(ServerFeature.ServerFeatureContext featureContext) Set up a server feature.type()
Type of this implementation, to distinguish instances of same type, with differentNamedService.name()
.double
weight()
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:NamedService
Name of this implementation, as provided inConfiguredProvider.create(Config, String)
.- Specified by:
name
in interfaceNamedService
- Returns:
- name of this service
-
prototype
Returns the prototype.- Specified by:
prototype
in interfaceRuntimeType.Api<EurekaRegistrationConfig>
- Returns:
- the prototype
-
setup
Description copied from interface:ServerFeature
Set 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:
setup
in interfaceServerFeature
- Parameters:
featureContext
- to access builders of webserver, listeners, and routing
-
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
- Returns:
- type of this service
-
weight
public double weight()Description copied from interface:Weighted
Weight of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation). If not dynamic, you can use theWeight
annotation 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
- aConsumer
that updates a suppliedEurekaRegistrationConfig.Builder
; must not benull
- Returns:
- a non-
null
EurekaRegistrationServerFeature
- Throws:
NullPointerException
- ifbuilderConsumer
isnull
- See Also:
-