|
||||||||||
| 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 | |
|---|---|
MediaType |
getEffectiveAcceptableType()
Get the effective content type of the response calculated from the request Accept header values and @Consumes
value of the matched resource method. |
java.lang.String |
getFinalMatchingGroup()
Get the final matching group of the last successful request URI routing pattern match result. |
Inflector<Request,Response> |
getInflector()
Get the matched request to response data inflector if present, or null
otherwise. |
java.util.List<java.util.regex.MatchResult> |
getMatchedResults()
Get a read-only list of match results for matched
request URI routing patterns. |
java.lang.annotation.Annotation[] |
getResponseMethodAnnotations()
Get the annotations on the method ultimately used to process the request. |
java.lang.reflect.Type |
getResponseMethodType()
Get the response type of the method ultimately used to process the request. |
java.lang.Object |
peekMatchedResource()
Peek the last resource object that successfully matched the request URI. |
java.util.regex.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 |
pushMatchedResource(java.lang.Object resource)
Push the resource that matched the request URI. |
void |
pushMatchResult(java.util.regex.MatchResult matchResult)
Push the result of the successful request URI routing pattern match. |
void |
pushTemplate(UriTemplate template)
Push matched request URI routing pattern URI template. |
void |
setEffectiveAcceptableType(MediaType type)
Set the effective content type of the response calculated from the request Accept header values and @Consumes
value of the matched resource method. |
void |
setInflector(Inflector<Request,Response> inflector)
Set the matched request to response inflector. |
void |
setResponseMethodAnnotations(java.lang.annotation.Annotation[] annotations)
Set the annotations on the method ultimately used to process the request. |
void |
setResponseMethodType(java.lang.reflect.Type responseType)
Set the response type of the method ultimately used to process the request. |
| Method Detail |
|---|
void pushMatchResult(java.util.regex.MatchResult matchResult)
matchResult - successful request URI routing pattern
match result.void pushMatchedResource(java.lang.Object resource)
resource - instance of the resource that matched the request URI.java.lang.Object peekMatchedResource()
pushMatchedResource(java.lang.Object)java.util.regex.MatchResult peekMatchResult()
match result.
void pushTemplate(UriTemplate template)
URI template.
template - URI template of the matched request URI routing pattern.java.lang.String getFinalMatchingGroup()
match result. Also known as right-hand path.
May be empty but is never null.
java.util.List<java.util.regex.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.
MediaType getEffectiveAcceptableType()
Accept header values and @Consumes
value of the matched resource method. May return null if no
method was yet matched.
null if no
resource method was yet matched.
void setEffectiveAcceptableType(MediaType type)
throws java.lang.NullPointerException
Accept header values and @Consumes
value of the matched resource method. The input value must not be
null otherwise a NullPointerException is thrown.
type - new effective accepted media type.
java.lang.NullPointerException - in case the input parameter is null.
void setResponseMethodType(java.lang.reflect.Type responseType)
throws java.lang.NullPointerException
responseType - response type.
java.lang.NullPointerException - in case the input parameter is null.java.lang.reflect.Type getResponseMethodType()
void setResponseMethodAnnotations(java.lang.annotation.Annotation[] annotations)
throws java.lang.NullPointerException
annotations - response method annotations.
java.lang.NullPointerException - in case the input parameter is null.java.lang.annotation.Annotation[] getResponseMethodAnnotations()
void setInflector(Inflector<Request,Response> inflector)
inflector - matched request to response inflector.Inflector<Request,Response> getInflector()
null
otherwise.
null if not available.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||