Package com.linecorp.armeria.server
Enum TransientServiceOption
- All Implemented Interfaces:
Serializable
,Comparable<TransientServiceOption>
,java.lang.constant.Constable
public enum TransientServiceOption extends Enum<TransientServiceOption>
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 Constants Enum Constant Description WITH_ACCESS_LOGGING
EnablesAccessLogWriter
to produce the access logs of the requests to theTransientService
.WITH_METRIC_COLLECTION
EnablesMetricCollectingService
to collect the metrics of the requests to theTransientService
.WITH_SERVICE_LOGGING
EnablesLoggingService
to log the requests to theTransientService
.WITH_TRACING
Enables to trace the requests to theTransientService
. -
Method Summary
Modifier and Type Method Description static Set<TransientServiceOption>
allOf()
Returns allTransientServiceOption
s.static TransientServiceOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static TransientServiceOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WITH_METRIC_COLLECTION
EnablesMetricCollectingService
to collect the metrics of the requests to theTransientService
. -
WITH_SERVICE_LOGGING
EnablesLoggingService
to log the requests to theTransientService
. -
WITH_ACCESS_LOGGING
EnablesAccessLogWriter
to 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
allOf
Returns allTransientServiceOption
s.
-