Interface AnnotatedService
- All Superinterfaces:
HttpService,Service<HttpRequest,,HttpResponse> Unwrappable
An
HttpService which is defined by a Path or HTTP method annotations.
This class is designed to provide a common interface and expose as public for Annotated HTTP Service.
Please check out the documentation at
Annotated HTTP Service to use this.-
Method Summary
Modifier and TypeMethodDescriptionReturns the defaultHttpStatusspecified withStatusCode.method()Returns the targetMethodinvoked when a request is received.default StringReturns the name of the target method invoked when a request is received.name()Returns the name of this annotated service specified withServiceName.route()Returns theRoutefor thisAnnotatedService.Class<?> Returns theClassof the annotated service object specified withServerBuilder.annotatedService(Object).Returns the annotated service object specified withServerBuilder.annotatedService(Object).Methods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorate, exchangeType, options, serveMethods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrapMethods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Method Details
-
name
Returns the name of this annotated service specified withServiceName. -
serviceObject
Object serviceObject()Returns the annotated service object specified withServerBuilder.annotatedService(Object). -
serviceClass
Class<?> serviceClass()Returns theClassof the annotated service object specified withServerBuilder.annotatedService(Object). -
method
Method method()Returns the targetMethodinvoked when a request is received. -
methodName
Returns the name of the target method invoked when a request is received. -
route
Route route()Returns theRoutefor thisAnnotatedService. -
defaultStatus
HttpStatus defaultStatus()Returns the defaultHttpStatusspecified withStatusCode. IfStatusCodeis not given,HttpStatus.OKis returned by default. If the method returns a void type such asVoidor Kotlin Unit,HttpStatus.NO_CONTENTis returned.
-