Class AnnotatedServiceBindingBuilder

java.lang.Object
com.linecorp.armeria.server.AnnotatedServiceBindingBuilder

public final class AnnotatedServiceBindingBuilder extends Object
A builder class for binding an HttpService fluently. This class can be instantiated through ServerBuilder.annotatedService().

Call build(Object) to build the HttpService and return to the ServerBuilder.


 ServerBuilder sb = Server.builder();
 sb.annotatedService()                       // Returns an instance of this class
   .requestTimeoutMillis(5000)
   .maxRequestLength(8192)
   .exceptionHandler((ctx, request, cause) -> HttpResponse.of(400))
   .pathPrefix("/foo")
   .verboseResponses(true)
   .build(new Service())                     // Return to the ServerBuilder.
   .build();
 
See Also: