Package com.linecorp.armeria.spring
Class ArmeriaSettings
java.lang.Object
com.linecorp.armeria.spring.ArmeriaSettings
@ConfigurationProperties(prefix="armeria") @Validated public class ArmeriaSettings extends Object
Settings for armeria servers. For example:
armeria:
ports:
- port: 8080
protocol: HTTP
- ip: 127.0.0.1
port: 8081
protocol:HTTP
- port: 8443
protocol: HTTPS
ssl:
key-alias: "host.name.com"
key-store: "keystore.jks"
key-store-password: "changeme"
trust-store: "truststore.jks"
trust-store-password: "changeme"
compression:
enabled: true
mime-types: text/*, application/json
excluded-user-agents: some-user-agent, another-user-agent
min-response-size: 1KB
TODO(ide) Adds virtualhost settings-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArmeriaSettings.Compression
Configurations for the HTTP content encoding.static class
ArmeriaSettings.Port
Port and protocol settings. -
Constructor Summary
Constructors Constructor Description ArmeriaSettings()
-
Method Summary
Modifier and Type Method Description ArmeriaSettings.Compression
getCompression()
Returns the HTTP content encoding configuration that theServer
uses.String
getDocsPath()
Returns the path of theDocService
.long
getGracefulShutdownQuietPeriodMillis()
Returns the number of milliseconds to wait for active requests to go end before shutting down.long
getGracefulShutdownTimeoutMillis()
Returns the number of milliseconds to wait before shutting down the server regardless of active requests.String
getHealthCheckPath()
Returns the path of theHealthCheckService
.String
getMetricsPath()
Returns the path of the metrics exposition service.List<ArmeriaSettings.Port>
getPorts()
Returns theArmeriaSettings.Port
s of theServer
.Ssl
getSsl()
boolean
isEnableMetrics()
Returns whether to enable metrics exposition service at the path specified viasetMetricsPath(String)
.void
setCompression(ArmeriaSettings.Compression compression)
Sets the HTTP content encoding configuration that theServer
uses.void
setDocsPath(String docsPath)
Sets the path of theDocService
.void
setEnableMetrics(boolean enableMetrics)
Sets whether to enable metrics exposition service at the path specified viasetMetricsPath(String)
.void
setGracefulShutdownQuietPeriodMillis(long gracefulShutdownQuietPeriodMillis)
Sets the number of milliseconds to wait for active requests to go end before shutting down.void
setGracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Sets the number of milliseconds to wait before shutting down the server regardless of active requests.void
setHealthCheckPath(String healthCheckPath)
Sets the path of theHealthCheckService
.void
setMetricsPath(String metricsPath)
Sets the path of the metrics exposition service.void
setPorts(List<ArmeriaSettings.Port> ports)
Sets theArmeriaSettings.Port
s of theServer
.void
setSsl(Ssl ssl)
-
Constructor Details
-
ArmeriaSettings
public ArmeriaSettings()
-
-
Method Details
-
getPorts
Returns theArmeriaSettings.Port
s of theServer
. -
setPorts
Sets theArmeriaSettings.Port
s of theServer
. -
getHealthCheckPath
Returns the path of theHealthCheckService
. -
setHealthCheckPath
Sets the path of theHealthCheckService
. -
getDocsPath
Returns the path of theDocService
. -
setDocsPath
Sets the path of theDocService
. -
getMetricsPath
Returns the path of the metrics exposition service.PrometheusExpositionService
will be used ifPrometheusMeterRegistry
is available. Otherwise, Dropwizard'sMetricsModule
will be used ifDropwizardMeterRegistry
is available. -
setMetricsPath
Sets the path of the metrics exposition service.PrometheusExpositionService
will be used ifPrometheusMeterRegistry
is available. Otherwise, Dropwizard'sMetricsModule
will be used ifDropwizardMeterRegistry
is available. -
getGracefulShutdownQuietPeriodMillis
public long getGracefulShutdownQuietPeriodMillis()Returns the number of milliseconds to wait for active requests to go end before shutting down. -
setGracefulShutdownQuietPeriodMillis
public void setGracefulShutdownQuietPeriodMillis(long gracefulShutdownQuietPeriodMillis)Sets the number of milliseconds to wait for active requests to go end before shutting down. -
getGracefulShutdownTimeoutMillis
public long getGracefulShutdownTimeoutMillis()Returns the number of milliseconds to wait before shutting down the server regardless of active requests. -
setGracefulShutdownTimeoutMillis
public void setGracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)Sets the number of milliseconds to wait before shutting down the server regardless of active requests. -
isEnableMetrics
public boolean isEnableMetrics()Returns whether to enable metrics exposition service at the path specified viasetMetricsPath(String)
. -
setEnableMetrics
public void setEnableMetrics(boolean enableMetrics)Sets whether to enable metrics exposition service at the path specified viasetMetricsPath(String)
. -
getSsl
-
setSsl
-
getCompression
Returns the HTTP content encoding configuration that theServer
uses. -
setCompression
Sets the HTTP content encoding configuration that theServer
uses.
-