Package com.linecorp.armeria.server.docs
Class DocService
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Service<T_I,T_O>>
com.linecorp.armeria.server.DecoratingService<I,O,I,O>
com.linecorp.armeria.server.SimpleDecoratingService<HttpRequest,HttpResponse>
com.linecorp.armeria.server.SimpleDecoratingHttpService
com.linecorp.armeria.server.docs.DocService
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,HttpResponse>
public final class DocService extends SimpleDecoratingHttpService
An
HttpService
that provides information about the Service
s running in a
Server
. It does not require any configuration besides adding it to a VirtualHost
; it
discovers all the eligible Service
s automatically.
How is the documentation generated?
DocService
looks up the DocServicePlugin
s available in the current JVM
using Java SPI (Service Provider Interface). The DocServicePlugin
implementations will
generate ServiceSpecification
s for the Service
s they support.
-
Constructor Summary
Constructors Constructor Description DocService()
Creates a new instance. -
Method Summary
Modifier and Type Method Description static DocServiceBuilder
builder()
Returns a newDocServiceBuilder
.HttpResponse
serve(ServiceRequestContext ctx, HttpRequest req)
Serves an incomingRequest
.void
serviceAdded(ServiceConfig cfg)
Invoked when this service has been added to aServer
with the specified configuration.Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, toString, unwrap
-
Constructor Details
-
DocService
public DocService()Creates a new instance.
-
-
Method Details
-
builder
Returns a newDocServiceBuilder
. -
serviceAdded
Description copied from interface:Service
Invoked when this service has been added to aServer
with the specified configuration. Please note that this method can be invoked more than once if this service has been added more than once.- Specified by:
serviceAdded
in interfaceService<HttpRequest,HttpResponse>
- Overrides:
serviceAdded
in classDecoratingService<HttpRequest,HttpResponse,HttpRequest,HttpResponse>
- Throws:
Exception
-
serve
Description copied from interface:Service
Serves an incomingRequest
.
-