| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private Comparator | |
| private final CopyOnWriteArrayList | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Publisher | apply(HttpServerRequest
the first function argument request, HttpServerResponse the second function argument response)Implements java. |
| public HttpServerRoutes | comparator(Comparator<HttpRouteHandlerMetadata>
a HttpRouteHandlerMetadata comparator. comparator)Implements reactor. java. to sort routes, rather than using configured order.Routes that were
already configured are also impacted by this change and will be sorted according to the comparator.You can revert
to using the declaration order by calling the noComparator() method (which is the default).
|
| public HttpServerRoutes | directory(String
The GET path used by clients uri, Path the root prefix to serve from the file system, e.g.
"/Users/me/resources" directory, Function<HttpServerResponse, HttpServerResponse> a pre response processor interceptor)Implements reactor. directory will be served.
|
| public HttpServerRoutes | noComparator()
Implements reactor. java. customization using
HttpServerRoutes#comparator(Comparator), and use the order in which the routes were configured.
|
| public HttpServerRoutes | removeIf(Predicate<? super HttpRouteHandlerMetadata>
a predicate given each http route handler condition)HttpRouteHandlerMetadataImplements reactor. HttpServerRoutes#route(Predicate, BiFunction) will be removed.
|
| public HttpServerRoutes | route(Predicate<? super HttpServerRequest>
a predicate given each inbound request condition, BiFunction<? super HttpServerRequest, ? super HttpServerResponse, ? extends Publisher<Void>> the I/O handler to invoke on match handler)Implements reactor. |
| comparator | back to summary |
|---|---|
| private Comparator<HttpRouteHandlerMetadata> comparator | |
| handlers | back to summary |
|---|---|
| private final CopyOnWriteArrayList<DefaultHttpServerRoutes. | |
| initialOrderHandlers | back to summary |
|---|---|
| private final List<DefaultHttpServerRoutes. | |
| DefaultHttpServerRoutes | back to summary |
|---|---|
| pack-priv DefaultHttpServerRoutes() | |
| apply | back to summary |
|---|---|
| public Publisher Implements java. Doc from java. Applies this function to the given arguments.
| |
| comparator | back to summary |
|---|---|
| public HttpServerRoutes comparator(Comparator<HttpRouteHandlerMetadata> comparator) Implements reactor. Doc from reactor. Use the provided
| |
| directory | back to summary |
|---|---|
| public HttpServerRoutes directory(String uri, Path directory, Function<HttpServerResponse, HttpServerResponse> interceptor) Implements reactor. Doc from reactor. Listens for HTTP GET on the passed path to be used as a routing condition.The
content of the provided Additional regex matching is available, e.g. "/test/{param}". Params are resolved
using
| |
| noComparator | back to summary |
|---|---|
| public HttpServerRoutes noComparator() Implements reactor. Doc from reactor. Removes any previously applied
| |
| removeIf | back to summary |
|---|---|
| public HttpServerRoutes removeIf(Predicate<? super HttpRouteHandlerMetadata> condition) Implements reactor. Doc from reactor. A generic route predicate that if matched already register I/O handler use
| |
| route | back to summary |
|---|---|
| public HttpServerRoutes route(Predicate<? super HttpServerRequest> condition, BiFunction<? super HttpServerRequest, ? super HttpServerResponse, ? extends Publisher<Void>> handler) Implements reactor. Doc from reactor. A generic route predicate that if matched invoke the passed I/O handler.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Predicate | |
| pack-priv final BiFunction | |
| pack-priv final HttpMethod | |
| pack-priv final String | |
| pack-priv final Function |
| Access | Constructor and Description |
|---|---|
| pack-priv | HttpRouteHandler(Predicate<? super HttpServerRequest> condition, BiFunction<? super HttpServerRequest, ? super HttpServerResponse, ? extends Publisher<Void>> handler, Function<? super String, Map<String, String>> resolver, String path, HttpMethod method)
|
| Modifier and Type | Method and Description |
|---|---|
| public Publisher | apply(HttpServerRequest
the first function argument request, HttpServerResponse the second function argument response)Implements java. |
| public HttpMethod | getMethod()
Implements reactor. |
| public String | getPath()
Implements reactor. |
| public boolean | test(HttpServerRequest
the input argument o)Implements java. |
| condition | back to summary |
|---|---|
| pack-priv final Predicate<? super HttpServerRequest> condition | |
| handler | back to summary |
|---|---|
| pack-priv final BiFunction<? super HttpServerRequest, ? super HttpServerResponse, ? extends Publisher<Void>> handler | |
| method | back to summary |
|---|---|
| pack-priv final HttpMethod method | |
| path | back to summary |
|---|---|
| pack-priv final String path | |
| resolver | back to summary |
|---|---|
| pack-priv final Function<? super String, Map<String, String>> resolver | |
| HttpRouteHandler | back to summary |
|---|---|
| pack-priv HttpRouteHandler(Predicate<? super HttpServerRequest> condition, BiFunction<? super HttpServerRequest, ? super HttpServerResponse, ? extends Publisher<Void>> handler, Function<? super String, Map<String, String>> resolver, String path, HttpMethod method) | |
| apply | back to summary |
|---|---|
| public Publisher Implements java. Doc from java. Applies this function to the given arguments.
| |
| getMethod | back to summary |
|---|---|
| public HttpMethod getMethod() Implements reactor. Doc from reactor. Get the http method this handler can handle
| |
| getPath | back to summary |
|---|---|
| public String getPath() Implements reactor. Doc from reactor. Get the http path this handler can handle | |
| test | back to summary |
|---|---|
| public boolean test(HttpServerRequest o) Implements java. Doc from java. Evaluates this predicate on the given argument.
| |