public class SimpleCompositeService<I extends Request,O extends Response> extends AbstractCompositeService<I,O>
AbstractCompositeService
implementation. Useful when you do not want to define
a new dedicated Service
type.Constructor and Description |
---|
SimpleCompositeService(CompositeServiceEntry<I,O>... services)
Creates a new instance that is composed of the specified entries.
|
SimpleCompositeService(Iterable<CompositeServiceEntry<I,O>> services)
Creates a new instance that is composed of the specified entries.
|
Modifier and Type | Method and Description |
---|---|
PathMapped<Service<I,O>> |
findService(PathMappingContext mappingCtx)
|
<T extends Service<I,O>> |
serviceAt(int index)
|
List<CompositeServiceEntry<I,O>> |
services()
Returns the list of
CompositeServiceEntry s added to this composite Service . |
serve, serviceAdded
@SafeVarargs public SimpleCompositeService(CompositeServiceEntry<I,O>... services)
public SimpleCompositeService(Iterable<CompositeServiceEntry<I,O>> services)
public List<CompositeServiceEntry<I,O>> services()
AbstractCompositeService
CompositeServiceEntry
s added to this composite Service
.public <T extends Service<I,O>> T serviceAt(int index)
AbstractCompositeService
public PathMapped<Service<I,O>> findService(PathMappingContext mappingCtx)
AbstractCompositeService
findService
in class AbstractCompositeService<I extends Request,O extends Response>
mappingCtx
- a context to find the Service
.Service
wrapped by PathMapped
if there's a match.
PathMapped.empty()
if there's no match.© Copyright 2015–2018 LINE Corporation. All rights reserved.