|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RoutingContext
Jersey request matching and routing context.
| Method Summary | |
|---|---|
Iterable<javax.ws.rs.ext.ReaderInterceptor> |
getBoundReaderInterceptors()
Get all reader interceptors applicable to this request. |
Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> |
getBoundRequestFilters()
Get all bound request filters applicable to this request. |
Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>> |
getBoundResponseFilters()
Get all bound response filters applicable to this request. |
Iterable<javax.ws.rs.ext.WriterInterceptor> |
getBoundWriterInterceptors()
Get all writer interceptors applicable to this request. |
String |
getFinalMatchingGroup()
Get the final matching group of the last successful request URI routing pattern match result. |
Inflector<ContainerRequest,ContainerResponse> |
getInflector()
Get the matched request to response data inflector if present, or null
otherwise. |
List<MatchResult> |
getMatchedResults()
Get a read-only list of match results for matched
request URI routing patterns. |
Object |
peekMatchedResource()
Peek the last resource object that successfully matched the request URI. |
MatchResult |
peekMatchResult()
Peek at the last successful request URI routing pattern match result. |
void |
pushLeftHandPath()
Add currently matched left-hand side part of request path to the list of matched paths returned by UriInfo.getMatchedURIs(). |
void |
pushLocatorSubResource(Resource subResourceFromLocator)
Push sub resource returned from a sub resource locator method. |
void |
pushMatchedLocator(ResourceMethod resourceLocator)
Push the matched sub resource locator method. |
void |
pushMatchedResource(Object resource)
Push the resource that matched the request URI. |
void |
pushMatchedRuntimeResource(RuntimeResource runtimeResource)
Push a matched runtime resource that was visited during matching phase. |
void |
pushMatchResult(MatchResult matchResult)
Push the result of the successful request URI routing pattern match. |
void |
pushTemplates(UriTemplate resourceTemplate,
UriTemplate methodTemplate)
Push matched request URI routing pattern templates
for a single matched method. |
void |
setInflector(Inflector<ContainerRequest,ContainerResponse> inflector)
Set the matched request to response inflector. |
void |
setMatchedResourceMethod(ResourceMethod resourceMethod)
Set the matched resource method. |
| Methods inherited from interface javax.ws.rs.container.ResourceInfo |
|---|
getResourceClass, getResourceMethod |
| Method Detail |
|---|
void pushMatchResult(MatchResult matchResult)
matchResult - successful request URI routing pattern
match result.void pushMatchedResource(Object resource)
resource - instance of the resource that matched the request URI.Object peekMatchedResource()
pushMatchedResource(java.lang.Object)MatchResult peekMatchResult()
match result.
void pushTemplates(UriTemplate resourceTemplate,
UriTemplate methodTemplate)
templates
for a single matched method.
In case only a single path matching has been performed on the resource (in case of resource methods,
only the resource path is matched), the method template should be passed as null.
In case a path matching has been performed on both a resource and method paths
(in case of sub-resource methods and locators), both templates (resource and method) must be specified.
resourceTemplate - resource URI template that should be pushed.methodTemplate - (sub-resource) method or locator URI template that should be pushed.String getFinalMatchingGroup()
match result. Also known as right-hand path.
May be empty but is never null.
List<MatchResult> getMatchedResults()
match results for matched
request URI routing patterns. Entries are ordered in reverse request URI
matching order, with the root request URI routing pattern match result
last.
void pushLeftHandPath()
UriInfo.getMatchedURIs().
Left-hand side request path is the request path excluding the suffix
part of the path matched by the final
matching group of the last successful request URI routing pattern.
void setInflector(Inflector<ContainerRequest,ContainerResponse> inflector)
inflector - matched request to response inflector.Inflector<ContainerRequest,ContainerResponse> getInflector()
null
otherwise.
null if not available.Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> getBoundRequestFilters()
Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>> getBoundResponseFilters()
Iterable<javax.ws.rs.ext.ReaderInterceptor> getBoundReaderInterceptors()
Iterable<javax.ws.rs.ext.WriterInterceptor> getBoundWriterInterceptors()
void setMatchedResourceMethod(ResourceMethod resourceMethod)
resource method. This method needs to be called only if the method was
matched. This method should be called only for setting the final resource method and not for setting sub resource
locators invoked during matching.
resourceMethod - Resource method that was matched.void pushMatchedLocator(ResourceMethod resourceLocator)
sub resource locator method.
resourceLocator - Sub resource locator method.void pushMatchedRuntimeResource(RuntimeResource runtimeResource)
runtime resource that was visited during matching phase. This method must
be called for any matched runtime resource.
runtimeResource - Runtime resource that was matched during matching.void pushLocatorSubResource(Resource subResourceFromLocator)
sub resource returned from a sub resource locator method. The pushed
subResourceFromLocator is the final model of a sub resource which is already enhanced by
model processors and
validated.
subResourceFromLocator - Resource constructed from result of sub resource locator method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||