public final class NonApplicationRootPathBuildItem
extends io.quarkus.builder.item.SimpleBuildItem
| Modifier and Type | Class and Description |
|---|---|
static class |
NonApplicationRootPathBuildItem.Builder
Per non-application endpoint instance.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
attachedToMainRouter |
(package private) boolean |
dedicatedRouterRequired
Non-Application root path is distinct from HTTP root path.
|
(package private) URI |
httpRootPath
Normalized of quarkus.http.root-path.
|
(package private) URI |
nonApplicationRootPath
Normalized from quarkus.http.non-application-root-path
|
| Constructor and Description |
|---|
NonApplicationRootPathBuildItem(String httpRootPath,
String nonApplicationRootPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
getNonApplicationRootPath()
Return normalized root path configured from quarkus.http.root-path
and {quarkus.http.non-application-root-path}.
|
String |
getNormalizedHttpRootPath() |
(package private) String |
getVertxRouterPath()
Path to the Non-application root for use with Vert.x Routers,
has a leading slash.
|
boolean |
isAttachedToMainRouter() |
boolean |
isDedicatedRouterRequired()
Is a dedicated router required for non-application endpoints.
|
(package private) String |
relativize(String rootPath,
String leafPath) |
String |
resolveNestedPath(String path,
String subRoute)
Resolve a base path and a sub-resource against the non-application root.
|
String |
resolvePath(String path)
Resolve path into an absolute path.
|
NonApplicationRootPathBuildItem.Builder |
routeBuilder() |
final URI httpRootPath
final URI nonApplicationRootPath
final boolean dedicatedRouterRequired
final boolean attachedToMainRouter
public boolean isDedicatedRouterRequired()
public boolean isAttachedToMainRouter()
String getVertxRouterPath()
If it's under the HTTP Root, return a path relative to HTTP Root. Otherwise, return an absolute path.
public String getNormalizedHttpRootPath()
public String getNonApplicationRootPath()
Use resolvePath(String) if you need to construct a URI for
a non-application endpoint.
resolvePath(String)public String resolvePath(String path)
Given quarkus.http.root-path=/ and quarkus.http.non-application-root-path="q"
resolvePath("foo") will return /q/fooresolvePath("/foo") will return /fooGiven quarkus.http.root-path=/ and quarkus.http.non-application-root-path="/q"
resolvePath("foo") will return /q/fooresolvePath("/foo") will return /fooresolvePath("foo") will return /app/q/fooresolvePath("/foo") will return /fooresolvePath("foo") will return /q/fooresolvePath("/foo") will return /fooThe returned path will not end with a slash.
path - Path to be resolved to an absolute path.IllegalArgumentException - if path is null or emptyUriNormalizationUtil.normalizeWithBase(URI, String, boolean)public String resolveNestedPath(String path, String subRoute)
resolveNestedPath("foo", "a") will return /q/foo/aresolveNestedPath("foo", "/a) will return /aThe returned path will not end with a slash.
path - Path to be resolved to an absolute path.IllegalArgumentException - if path is null or emptyUriNormalizationUtil.normalizeWithBase(URI, String, boolean),
resolvePath(String)public NonApplicationRootPathBuildItem.Builder routeBuilder()
Copyright © 2021 JBoss by Red Hat. All rights reserved.