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)
Deprecated.
|
SimpleCompositeService(Iterable<CompositeServiceEntry<HttpService>> services)
Deprecated.
Use
of(Iterable). |
| Modifier and Type | Method and Description |
|---|---|
static SimpleCompositeServiceBuilder |
builder()
Returns a new
SimpleCompositeServiceBuilder. |
Routed<HttpService> |
findService(RoutingContext routingCtx)
|
static SimpleCompositeService |
of(CompositeServiceEntry<HttpService>... services)
Returns a new
SimpleCompositeService that is composed of the specified entries. |
static SimpleCompositeService |
of(Iterable<CompositeServiceEntry<HttpService>> services)
Returns a new
SimpleCompositeService that is composed of the specified entries. |
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 @Deprecated public SimpleCompositeService(CompositeServiceEntry<HttpService>... services)
of(CompositeServiceEntry[]).@Deprecated public SimpleCompositeService(Iterable<CompositeServiceEntry<HttpService>> services)
of(Iterable).@SafeVarargs public static SimpleCompositeService of(CompositeServiceEntry<HttpService>... services)
SimpleCompositeService that is composed of the specified entries.public static SimpleCompositeService of(Iterable<CompositeServiceEntry<HttpService>> services)
SimpleCompositeService that is composed of the specified entries.public static SimpleCompositeServiceBuilder builder()
SimpleCompositeServiceBuilder.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.