|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.server.impl.application.WebApplicationContext
public final class WebApplicationContext
| Field Summary | |
|---|---|
static java.lang.String |
HTTP_METHOD_MATCH_RESOURCE
|
| Constructor Summary | |
|---|---|
WebApplicationContext(WebApplicationImpl app,
ContainerRequest request,
ContainerResponse response)
|
|
| Method Summary | |
|---|---|
WebApplicationContext |
createMatchResourceContext(java.net.URI u)
|
java.net.URI |
getAbsolutePath()
|
UriBuilder |
getAbsolutePathBuilder()
|
java.net.URI |
getBaseUri()
|
UriBuilder |
getBaseUriBuilder()
|
ContainerRequest |
getContainerRequest()
Get the container request. |
ContainerResponse |
getContainerResponse()
Get the container response. |
java.lang.Throwable |
getMappedThrowable()
Get the throwable that was mapped to a response. |
AbstractResourceMethod |
getMatchedMethod()
Get get matched resource method that was invoked. |
java.util.List<java.lang.Object> |
getMatchedResources()
|
java.util.List<java.util.regex.MatchResult> |
getMatchedResults()
Get a read-only list of MatchResult for matched resources. |
java.util.List<UriTemplate> |
getMatchedTemplates()
Get a read-only list of UriTemplate for matched resources. |
java.util.List<java.lang.String> |
getMatchedURIs()
|
java.util.List<java.lang.String> |
getMatchedURIs(boolean decode)
|
java.util.regex.MatchResult |
getMatchResult()
Get the match result |
java.lang.String |
getPath()
|
java.lang.String |
getPath(boolean decode)
|
MultivaluedMap<java.lang.String,java.lang.String> |
getPathParameters()
|
MultivaluedMap<java.lang.String,java.lang.String> |
getPathParameters(boolean decode)
|
java.util.List<PathSegment> |
getPathSegments()
|
java.util.List<PathSegment> |
getPathSegments(boolean decode)
|
java.util.List<PathSegment> |
getPathSegments(java.lang.String name)
Get the path segments that contains a template variable. |
java.util.List<PathSegment> |
getPathSegments(java.lang.String name,
boolean decode)
Get the path segments that contains a template variable. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Get the mutable properties. |
MultivaluedMap<java.lang.String,java.lang.String> |
getQueryParameters()
|
MultivaluedMap<java.lang.String,java.lang.String> |
getQueryParameters(boolean decode)
|
HttpRequestContext |
getRequest()
Get the HTTP request information. |
java.net.URI |
getRequestUri()
|
UriBuilder |
getRequestUriBuilder()
|
java.lang.Object |
getResource(java.lang.Class resourceClass)
Get the resource instance from a resource class. |
HttpResponseContext |
getResponse()
Get the HTTP response information. |
java.util.List<ContainerResponseFilter> |
getResponseFilters()
|
UriRules<UriRule> |
getRules(java.lang.Class resourceClass)
Get the rules for a resource class. |
ExtendedUriInfo |
getUriInfo()
Get the extended URI information. |
boolean |
isTracingEnabled()
Check if tracing is enabled. |
void |
pushContainerResponseFilters(java.util.List<ContainerResponseFilter> filters)
Push a list of container response filters to apply after the container response has been produced. |
void |
pushMatch(UriTemplate template,
java.util.List<java.lang.String> names)
Push a match. |
void |
pushMethod(AbstractResourceMethod arm)
Push the matching resource method. |
void |
pushResource(java.lang.Object resource)
Push a matching resource. |
void |
pushRightHandPathLength(int rhpathlen)
Push the right hand path length to calculate the entry for the list of matching (ancestor) URI paths. |
void |
setContainerRequest(ContainerRequest request)
Set the container request. |
void |
setContainerResponse(ContainerResponse response)
Set the container response. |
void |
setMatchResult(java.util.regex.MatchResult matchResult)
Set the match result |
void |
trace(java.lang.String message)
Add a trace message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String HTTP_METHOD_MATCH_RESOURCE
| Constructor Detail |
|---|
public WebApplicationContext(WebApplicationImpl app,
ContainerRequest request,
ContainerResponse response)
| Method Detail |
|---|
public WebApplicationContext createMatchResourceContext(java.net.URI u)
public java.util.List<ContainerResponseFilter> getResponseFilters()
public HttpRequestContext getRequest()
HttpContext
getRequest in interface HttpContextpublic HttpResponseContext getResponse()
HttpContext
getResponse in interface HttpContextpublic ExtendedUriInfo getUriInfo()
HttpContext
getUriInfo in interface HttpContextpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
HttpContextCare should be taken not to clear the properties or remove properties that are unknown otherwise unspecified behaviour may result.
getProperties in interface HttpContextpublic boolean isTracingEnabled()
Traceable
isTracingEnabled in interface Traceablepublic void trace(java.lang.String message)
Traceable
A trace message will be added if Traceable.isTracingEnabled() returns
true and tracing contraints are satisfied.
trace in interface Traceablemessage - the trace message to add.public java.util.regex.MatchResult getMatchResult()
UriMatchResultContext
getMatchResult in interface UriMatchResultContextpublic void setMatchResult(java.util.regex.MatchResult matchResult)
UriMatchResultContext
setMatchResult in interface UriMatchResultContextmatchResult - the match result.public ContainerRequest getContainerRequest()
UriRuleContext
getContainerRequest in interface UriRuleContextpublic void setContainerRequest(ContainerRequest request)
UriRuleContext
setContainerRequest in interface UriRuleContextrequest - the container request.public ContainerResponse getContainerResponse()
UriRuleContext
getContainerResponse in interface UriRuleContextpublic void setContainerResponse(ContainerResponse response)
UriRuleContext
setContainerResponse in interface UriRuleContextresponse - the container response.public void pushContainerResponseFilters(java.util.List<ContainerResponseFilter> filters)
UriRuleContextThe list of response filters is processed in reverse order of last to first.
pushContainerResponseFilters in interface UriRuleContextfilters - the list container response filterspublic java.lang.Object getResource(java.lang.Class resourceClass)
UriRuleContext
getResource in interface UriRuleContextresourceClass - the resource class
public UriRules<UriRule> getRules(java.lang.Class resourceClass)
UriRuleContext
getRules in interface UriRuleContextresourceClass - the resource class that has rules
public void pushMatch(UriTemplate template,
java.util.List<java.lang.String> names)
UriRuleContext
pushMatch in interface UriRuleContexttemplate - the matching URI template.names - the parameter names associated with the capturing group
values.public void pushResource(java.lang.Object resource)
UriRuleContext
pushResource in interface UriRuleContextresource - the matching resourcepublic void pushMethod(AbstractResourceMethod arm)
UriRuleContext
pushMethod in interface UriRuleContextarm - the matching resource method.public void pushRightHandPathLength(int rhpathlen)
UriRuleContext
pushRightHandPathLength in interface UriRuleContextrhpathlen - the right hand lengthpublic java.net.URI getBaseUri()
getBaseUri in interface UriInfopublic UriBuilder getBaseUriBuilder()
getBaseUriBuilder in interface UriInfopublic java.net.URI getAbsolutePath()
getAbsolutePath in interface UriInfopublic UriBuilder getAbsolutePathBuilder()
getAbsolutePathBuilder in interface UriInfopublic java.net.URI getRequestUri()
getRequestUri in interface UriInfopublic UriBuilder getRequestUriBuilder()
getRequestUriBuilder in interface UriInfopublic java.lang.String getPath()
getPath in interface UriInfopublic java.lang.String getPath(boolean decode)
getPath in interface UriInfopublic java.util.List<PathSegment> getPathSegments()
getPathSegments in interface UriInfopublic java.util.List<PathSegment> getPathSegments(boolean decode)
getPathSegments in interface UriInfopublic MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters()
getQueryParameters in interface UriInfopublic MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters(boolean decode)
getQueryParameters in interface UriInfopublic MultivaluedMap<java.lang.String,java.lang.String> getPathParameters()
getPathParameters in interface UriInfopublic MultivaluedMap<java.lang.String,java.lang.String> getPathParameters(boolean decode)
getPathParameters in interface UriInfopublic java.util.List<java.lang.String> getMatchedURIs()
getMatchedURIs in interface UriInfopublic java.util.List<java.lang.String> getMatchedURIs(boolean decode)
getMatchedURIs in interface UriInfopublic java.util.List<java.lang.Object> getMatchedResources()
getMatchedResources in interface UriInfopublic AbstractResourceMethod getMatchedMethod()
ExtendedUriInfo
getMatchedMethod in interface ExtendedUriInfopublic java.lang.Throwable getMappedThrowable()
ExtendedUriInfoA 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.
getMappedThrowable in interface ExtendedUriInfoContainerResponse.getMappedThrowable()public java.util.List<java.util.regex.MatchResult> getMatchedResults()
ExtendedUriInfoMatchResult for matched resources.
Entries are ordered in reverse request URI matching order, with the
root resource match result last.
getMatchedResults in interface ExtendedUriInfopublic java.util.List<UriTemplate> getMatchedTemplates()
ExtendedUriInfoUriTemplate 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.
getMatchedTemplates in interface ExtendedUriInfopublic java.util.List<PathSegment> getPathSegments(java.lang.String name)
ExtendedUriInfogetPathSegments(true).
getPathSegments in interface ExtendedUriInfoname - the template variable name
public java.util.List<PathSegment> getPathSegments(java.lang.String name,
boolean decode)
ExtendedUriInfo
getPathSegments in interface ExtendedUriInfoname - the template variable namedecode - controls whether sequences of escaped octets are decoded
(true) or not (false).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||