public interface ExtendedUriInfo
extends javax.ws.rs.core.UriInfo
UriInfo
.Modifier and Type | Method and Description |
---|---|
List<Resource> |
getLocatorSubResources()
Get the list of sub resources returned from resource locators during matching.
|
Throwable |
getMappedThrowable()
Get the throwable that was mapped to a response.
|
Resource |
getMatchedModelResource()
Get matched
model resource from which the matched resource method
was invoked. |
List<ResourceMethod> |
getMatchedResourceLocators()
Get resource locators matched since beginning of a matching.
|
ResourceMethod |
getMatchedResourceMethod()
Get matched
resource method that is invoked. |
List<MatchResult> |
getMatchedResults()
Get a read-only list of
MatchResult for matched resources. |
List<RuntimeResource> |
getMatchedRuntimeResources()
Return all matched
runtime resources including runtime resources
based on child resources. |
List<UriTemplate> |
getMatchedTemplates()
Get a read-only list of
UriTemplate for matched resources. |
List<javax.ws.rs.core.PathSegment> |
getPathSegments(String name)
Get the path segments that contain a template variable.
|
List<javax.ws.rs.core.PathSegment> |
getPathSegments(String name,
boolean decode)
Get the path segments that contain a template variable.
|
getAbsolutePath, getAbsolutePathBuilder, getBaseUri, getBaseUriBuilder, getMatchedResources, getMatchedURIs, getMatchedURIs, getPath, getPath, getPathParameters, getPathParameters, getPathSegments, getPathSegments, getQueryParameters, getQueryParameters, getRequestUri, getRequestUriBuilder, relativize, resolve
Throwable getMappedThrowable()
A response filter or a message body writer may utilize this method to determine if a resource method was invoked but did not return a response because an exception was thrown from the resource method, or the resource method returned but a response filter threw an exception.
List<MatchResult> getMatchedResults()
MatchResult
for matched resources.
Entries are ordered in reverse request URI matching order, with the
root resource match result last.List<UriTemplate> getMatchedTemplates()
UriTemplate
for matched resources.
Each entry is a URI template that is the value of the
Path
that is a partial path that matched a resource
class, a sub-resource method or a sub-resource locator.
Entries are ordered in reverse request URI matching order, with the
root resource URI template last.List<javax.ws.rs.core.PathSegment> getPathSegments(String name)
getPathSegments(true)
.name
- the template variable nameList<javax.ws.rs.core.PathSegment> getPathSegments(String name, boolean decode)
name
- the template variable namedecode
- controls whether sequences of escaped octets are decoded
(true) or not (false).List<RuntimeResource> getMatchedRuntimeResources()
runtime resources
including runtime resources
based on child resources. The list is ordered so that the runtime resource
currently being processed is the first element in the list.
The following example
@Path("foo") public class FooResource { @GET public String getFoo() {...} @Path("bar") public BarResource getBarResource() {...} } public class BarResource { @GET public String getBar() {...} }
The values returned by this method based on request uri and where the method is called from are:
Request | Called from | Value(s) |
---|---|---|
GET /foo | FooResource.getFoo | RuntimeResource["/foo"] |
GET /foo/bar | FooResource.getBarResource | RuntimeResource["foo/bar"], Resource["foo"] |
GET /foo/bar | BarResource.getBar | RuntimeResource[no path; based on BarResource.class], RuntimeResource["foo/bar"], RuntimeResource["foo"] |
ResourceMethod getMatchedResourceMethod()
resource method
that is invoked.
Note that sub resource locator is not not considered as a matched resource method and calling the method from
sub resource locator will therefore return null.Resource getMatchedModelResource()
model resource
from which the matched
resource method
was invoked. The resource can also be a child if the matched method is a sub resource method.
Note that method return only resource containing finally matched resource method
and not intermediary processed resources (parent resources or resources containing sub resource locators).List<ResourceMethod> getMatchedResourceLocators()
The resource locator is
a resource method
which is annotated by the @Path
and returns a sub resource.
List<Resource> getLocatorSubResources()
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.