Package com.linecorp.armeria.server
Class ServiceConfig
java.lang.Object
com.linecorp.armeria.server.ServiceConfig
public final class ServiceConfig extends Object
An
HttpService
configuration.-
Method Summary
Modifier and Type Method Description AccessLogWriter
accessLogWriter()
Returns the access log writer.String
defaultLogName()
Returns the default value of theRequestOnlyLog.name()
property which is used when no name was set viaRequestLogBuilder.name(String, String)
.String
defaultServiceName()
Returns the default value of theRequestOnlyLog.serviceName()
property which is used when no service name was set viaRequestLogBuilder.name(String, String)
.long
maxRequestLength()
Returns the maximum allowed length of the content decoded at the session layer.long
requestTimeoutMillis()
Returns the timeout of a request.Route
route()
Server
server()
HttpService
service()
Returns theHttpService
.boolean
shutdownAccessLogWriterOnStop()
Tells whether theAccessLogWriter
is shut down when theServer
stops.String
toString()
Set<TransientServiceOption>
transientServiceOptions()
boolean
verboseResponses()
Returns whether the verbose response mode is enabled.VirtualHost
virtualHost()
Returns theVirtualHost
theservice()
belongs to.
-
Method Details
-
virtualHost
Returns theVirtualHost
theservice()
belongs to. -
server
-
route
-
service
Returns theHttpService
. -
defaultServiceName
Returns the default value of theRequestOnlyLog.serviceName()
property which is used when no service name was set viaRequestLogBuilder.name(String, String)
. Ifnull
, one of the following values will be used instead:- gRPC - a service name (e.g,
com.foo.GrpcService
) - Thrift - a service type (e.g,
com.foo.ThriftService$AsyncIface
orcom.foo.ThriftService$Iface
) HttpService
and annotated service - an innermost class name
- gRPC - a service name (e.g,
-
defaultLogName
Returns the default value of theRequestOnlyLog.name()
property which is used when no name was set viaRequestLogBuilder.name(String, String)
. Ifnull
, one of the following values will be used instead:- gRPC - A capitalized method name defined in
io.grpc.MethodDescriptor
(e.g,GetItems
) - Thrift and annotated service - a method name (e.g,
getItems
) HttpService
- an HTTP method name
- gRPC - A capitalized method name defined in
-
requestTimeoutMillis
public long requestTimeoutMillis()Returns the timeout of a request.- See Also:
VirtualHost.requestTimeoutMillis()
-
maxRequestLength
public long maxRequestLength()Returns the maximum allowed length of the content decoded at the session layer. e.g. the content length of an HTTP request.- See Also:
VirtualHost.maxRequestLength()
-
verboseResponses
public boolean verboseResponses()Returns whether the verbose response mode is enabled. When enabled, the service response will contain the exception type and its full stack trace, which may be useful for debugging while potentially insecure. When disabled, the service response will not expose such server-side details to the client.- See Also:
VirtualHost.verboseResponses()
-
accessLogWriter
Returns the access log writer.- See Also:
VirtualHost.accessLogWriter()
-
shutdownAccessLogWriterOnStop
public boolean shutdownAccessLogWriterOnStop()Tells whether theAccessLogWriter
is shut down when theServer
stops. -
transientServiceOptions
Returns theSet
ofTransientServiceOption
s that are enabled for theservice()
. This method always returnsTransientServiceOption.allOf()
for a non-TransientService
because only aTransientService
can opt in and out usingTransientServiceBuilder.transientServiceOptions(TransientServiceOption...)
. -
toString
-