Class EurekaUpdatingListener
java.lang.Object
com.linecorp.armeria.server.ServerListenerAdapter
com.linecorp.armeria.server.eureka.EurekaUpdatingListener
- All Implemented Interfaces:
ServerListener
A
ServerListener
which registers the current Server
to Eureka.
EurekaUpdatingListener
sends renewal requests periodically so that the Server
is not removed
from the registry. When the Server
stops, EurekaUpdatingListener
deregisters the
Server
from Eureka by sending a cancellation request.-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(SessionProtocol sessionProtocol, EndpointGroup endpointGroup) Returns a newEurekaUpdatingListenerBuilder
created with the specifiedSessionProtocol
andEndpointGroup
.builder
(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, String path) Returns a newEurekaUpdatingListenerBuilder
created with the specifiedSessionProtocol
,EndpointGroup
and path.Returns a newEurekaUpdatingListenerBuilder
created with the specifiedeurekaUri
.Returns a newEurekaUpdatingListenerBuilder
created with the specifiedeurekaUri
.static EurekaUpdatingListener
of
(SessionProtocol sessionProtocol, EndpointGroup endpointGroup) Returns a newEurekaUpdatingListener
which registers the currentServer
to the specifiedEndpointGroup
.static EurekaUpdatingListener
of
(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, String path) Returns a newEurekaUpdatingListener
which registers the currentServer
to the specifiedEndpointGroup
under the specifiedpath
.static EurekaUpdatingListener
static EurekaUpdatingListener
void
serverStarted
(Server server) Invoked when aServer
finished its startup procedure successfully and it started to serve incoming requests.void
serverStopping
(Server server) Invoked when aServer
begins its shutdown procedure.Methods inherited from class com.linecorp.armeria.server.ServerListenerAdapter
serverStarting, serverStopped
-
Method Details
-
of
-
of
-
of
public static EurekaUpdatingListener of(SessionProtocol sessionProtocol, EndpointGroup endpointGroup) Returns a newEurekaUpdatingListener
which registers the currentServer
to the specifiedEndpointGroup
. -
of
public static EurekaUpdatingListener of(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, String path) Returns a newEurekaUpdatingListener
which registers the currentServer
to the specifiedEndpointGroup
under the specifiedpath
. -
builder
Returns a newEurekaUpdatingListenerBuilder
created with the specifiedeurekaUri
. -
builder
Returns a newEurekaUpdatingListenerBuilder
created with the specifiedeurekaUri
. -
builder
public static EurekaUpdatingListenerBuilder builder(SessionProtocol sessionProtocol, EndpointGroup endpointGroup) Returns a newEurekaUpdatingListenerBuilder
created with the specifiedSessionProtocol
andEndpointGroup
. -
builder
public static EurekaUpdatingListenerBuilder builder(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, String path) Returns a newEurekaUpdatingListenerBuilder
created with the specifiedSessionProtocol
,EndpointGroup
and path. -
serverStarted
Description copied from interface:ServerListener
Invoked when aServer
finished its startup procedure successfully and it started to serve incoming requests.- Specified by:
serverStarted
in interfaceServerListener
- Overrides:
serverStarted
in classServerListenerAdapter
- Throws:
Exception
-
serverStopping
Description copied from interface:ServerListener
Invoked when aServer
begins its shutdown procedure.- Specified by:
serverStopping
in interfaceServerListener
- Overrides:
serverStopping
in classServerListenerAdapter
- Throws:
Exception
-