Package com.linecorp.armeria.server
Enum Class TransientServiceOption
- All Implemented Interfaces:
Serializable,Comparable<TransientServiceOption>,java.lang.constant.Constable
Specifies which features should be enabled for a
TransientService.
For example, if you do:
ServerBuilder sb = Server.builder();
sb.service("/health", HealthCheckService.builder() // A TransientService
.transientServiceOptions(
TransientServiceOption.WITH_METRIC_COLLECTION,
TransientServiceOption.WITH_ACCESS_LOGGING)
.build());
then, the metric is collected by MetricCollectingService and access logs are produced by
AccessLogWriter for the HealthCheckService.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEnablesAccessLogWriterto produce the access logs of the requests to theTransientService.EnablesMetricCollectingServiceto collect the metrics of the requests to theTransientService.EnablesLoggingServiceto log the requests to theTransientService.Enables to trace the requests to theTransientService. -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<TransientServiceOption> allOf()Returns allTransientServiceOptions.static TransientServiceOptionReturns the enum constant of this class with the specified name.static TransientServiceOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WITH_METRIC_COLLECTION
EnablesMetricCollectingServiceto collect the metrics of the requests to theTransientService. -
WITH_SERVICE_LOGGING
EnablesLoggingServiceto log the requests to theTransientService. -
WITH_ACCESS_LOGGING
EnablesAccessLogWriterto produce the access logs of the requests to theTransientService. -
WITH_TRACING
Enables to trace the requests to theTransientService.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
allOf
Returns allTransientServiceOptions.
-