public final class SimpleCompositeService extends AbstractCompositeService<HttpService,HttpRequest,HttpResponse> implements HttpService
AbstractCompositeService implementation. Useful when you do not want to define
a new dedicated HttpService type.| Constructor and Description |
|---|
SimpleCompositeService(CompositeServiceEntry<HttpService>... services)
Creates a new instance that is composed of the specified entries.
|
SimpleCompositeService(Iterable<CompositeServiceEntry<HttpService>> services)
Creates a new instance that is composed of the specified entries.
|
| Modifier and Type | Method and Description |
|---|---|
Routed<HttpService> |
findService(RoutingContext routingCtx)
|
HttpService |
serviceAt(int index)
|
List<CompositeServiceEntry<HttpService>> |
services()
Returns the list of
CompositeServiceEntrys added to this composite Service. |
serve, serviceAddedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecorate, decorate, serveas, decorate, serviceAdded, shouldCachePath@SafeVarargs public SimpleCompositeService(CompositeServiceEntry<HttpService>... services)
public SimpleCompositeService(Iterable<CompositeServiceEntry<HttpService>> services)
public List<CompositeServiceEntry<HttpService>> services()
AbstractCompositeServiceCompositeServiceEntrys added to this composite Service.services in class AbstractCompositeService<HttpService,HttpRequest,HttpResponse>public HttpService serviceAt(int index)
AbstractCompositeServiceindex-th Service in this composite Service. The index of the
Service added first is 0, and so on.serviceAt in class AbstractCompositeService<HttpService,HttpRequest,HttpResponse>public Routed<HttpService> findService(RoutingContext routingCtx)
AbstractCompositeServicefindService in class AbstractCompositeService<HttpService,HttpRequest,HttpResponse>routingCtx - a context to find the Service.Service wrapped by Routed if there's a match.
Routed.empty() if there's no match.Copyright © 2020 LeanCloud. All rights reserved.