Package io.grpc.xds
Class XdsServerBuilder.DefaultListener
java.lang.Object
io.grpc.xds.XdsServerBuilder.DefaultListener
- All Implemented Interfaces:
XdsServerBuilder.XdsServingStatusListener
- Enclosing class:
XdsServerBuilder
private static class XdsServerBuilder.DefaultListener
extends Object
implements XdsServerBuilder.XdsServingStatusListener
Default implementation of
XdsServerBuilder.XdsServingStatusListener
that logs at WARNING level.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onNotServing
(Throwable throwable) Callback invoked when server is forced to be "not serving" due to an error.void
Log calls to onServing() following a call to onNotServing() at WARNING level.
-
Field Details
-
logger
-
prefix
-
notServingDueToError
boolean notServingDueToError
-
-
Constructor Details
-
DefaultListener
DefaultListener(String prefix)
-
-
Method Details
-
onServing
public void onServing()Log calls to onServing() following a call to onNotServing() at WARNING level.- Specified by:
onServing
in interfaceXdsServerBuilder.XdsServingStatusListener
-
onNotServing
Description copied from interface:XdsServerBuilder.XdsServingStatusListener
Callback invoked when server is forced to be "not serving" due to an error.- Specified by:
onNotServing
in interfaceXdsServerBuilder.XdsServingStatusListener
- Parameters:
throwable
- cause of the error
-