public class AnnotatedService extends Object implements HttpService
HttpService which is defined by a Path or HTTP method annotations.
This class is not supposed to be instantiated by a user. Please check out the documentation
Annotated HTTP Service to use this.| Modifier and Type | Method and Description |
|---|---|
Function<? super HttpService,? extends HttpService> |
exceptionHandlingDecorator()
Returns a
Function which produces an HttpService wrapped with an
ExceptionFilteredHttpResponseDecorator. |
HttpResponse |
serve(ServiceRequestContext ctx,
HttpRequest req)
Serves an incoming
Request. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecorate, decorateas, decorate, serviceAdded, shouldCachePathpublic HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception
ServiceRequest.serve in interface HttpServiceserve in interface Service<HttpRequest,HttpResponse>ctx - the context of the received Requestreq - the received RequestResponseExceptionpublic Function<? super HttpService,? extends HttpService> exceptionHandlingDecorator()
Function which produces an HttpService wrapped with an
ExceptionFilteredHttpResponseDecorator.Copyright © 2020 LeanCloud. All rights reserved.