Class AbstractCompositeService<T extends Service<I,​O>,​I extends Request,​O extends Response>

java.lang.Object
com.linecorp.armeria.server.composition.AbstractCompositeService<T,​I,​O>
Type Parameters:
T - the Service type
I - the Request type
O - the Response type
All Implemented Interfaces:
Unwrappable, Service<I,​O>
Direct Known Subclasses:
DocService, SimpleCompositeRpcService, SimpleCompositeService

public abstract class AbstractCompositeService<T extends Service<I,​O>,​I extends Request,​O extends Response>
extends Object
implements Service<I,​O>
A skeletal Service implementation that enables composing multiple Services into one. Extend this class to build your own composite Service. e.g.

 public class MyService extends AbstractCompositeService<HttpService, HttpRequest, HttpResponse> {
     public MyService() {
         super(CompositeServiceEntry.ofPrefix("/foo/", new FooService()),
               CompositeServiceEntry.ofPrefix("/bar/", new BarService()),
               CompositeServiceEntry.ofCatchAll(new OtherService()));
     }
 }
 
See Also:
AbstractCompositeServiceBuilder, CompositeServiceEntry