public final class SliceRoute extends Object implements Slice
Slice implementation which redirect requests to Slice
in SliceRoute.Path if RtRule matched.
Usage:
new SliceRoute(
new SliceRoute.Path(
new RtRule.ByMethod("GET"), new DownloadSlice(storage)
),
new SliceRoute.Path(
new RtRule.ByMethod("PUT"), new UploadSlice(storage)
)
);
| Modifier and Type | Class and Description |
|---|---|
static class |
SliceRoute.Path
Route path.
|
Slice.Wrap| Constructor and Description |
|---|
SliceRoute(List<SliceRoute.Path> routes)
New slice route.
|
SliceRoute(SliceRoute.Path... routes)
New slice route.
|
| Modifier and Type | Method and Description |
|---|---|
Response |
response(String line,
Iterable<Map.Entry<String,String>> headers,
org.reactivestreams.Publisher<ByteBuffer> body)
Respond to a http request.
|
public SliceRoute(SliceRoute.Path... routes)
routes - Routespublic SliceRoute(List<SliceRoute.Path> routes)
routes - RoutesCopyright © 2012–2020 jcabi.com. All rights reserved.