Package com.linecorp.armeria.server
Class ServiceConfig
java.lang.Object
com.linecorp.armeria.server.ServiceConfig
An
HttpService
configuration.-
Method Summary
Modifier and TypeMethodDescriptionReturns the access log writer.Returns the default value of theRequestOnlyLog.name()
property which is used when no name was set viaRequestLogBuilder.name(String, String)
.Deprecated.Returns a default naming rule for the name of services.long
Returns the maximum allowed length of the content decoded at the session layer.long
Returns the timeout of a request.route()
server()
service()
Returns theHttpService
.boolean
Tells whether theAccessLogWriter
is shut down when theServer
stops.toString()
boolean
Returns whether the verbose response mode is enabled.Returns theVirtualHost
theservice()
belongs to.
-
Method Details
-
virtualHost
Returns theVirtualHost
theservice()
belongs to. -
server
-
route
-
service
Returns theHttpService
. -
defaultServiceName
Deprecated.UsedefaultServiceNaming()
instead.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,
-
defaultServiceNaming
Returns a default naming rule for the name of services.- See Also:
VirtualHost.defaultServiceNaming()
-
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
-
defaultServiceNaming()
instead.