|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterContext
Context class used by filters implementing
RequestFilter
or
ResponseFilter
(or both).
Method Summary | |
---|---|
Response.ResponseBuilder |
createResponse()
Create a fresh response builder instance. |
Map<String,Object> |
getProperties()
Get a mutable map of request-scoped properties that can be used for communication between different request/response processing components. |
Request |
getRequest()
Get the request object. |
Request.RequestBuilder |
getRequestBuilder()
Get a builder for the request object. |
Response |
getResponse()
Get the response object. |
Response.ResponseBuilder |
getResponseBuilder()
Get a builder for the response object. |
void |
setRequest(Request req)
Set the request object in the context. |
void |
setResponse(Response res)
Set the response object in the context. |
Method Detail |
---|
Map<String,Object> getProperties()
null
. In the scope of a single request/response processing,
a same property map instance is shared by the following methods:
A request-scoped property is an application-defined property that may be
added, removed or modified by any of the components (user, filter, interceptor etc.)
that participate in a given request/response processing flow.
On the client side, this property map is initialized by calling
Configuration.setProperties(java.util.Map)
or
Configuration.setProperty(java.lang.String, java.lang.Object)
on the configuration object associated with the corresponding
request invocation
.
On the server side, specifying the initial values is implementation-specific.
If there are no initial properties set, the request-scoped property map is
initialized to an empty map.
Configuration
Request getRequest()
Response getResponse()
null
if a
response is not available, e.g. in a
RequestFilter
, and has not been
set by calling setResponse(javax.ws.rs.core.Response)
.
null
.void setRequest(Request req)
req
- request object to be set.void setResponse(Response res)
RequestFilter
or PreMatchRequestFilter
could set a response by calling this method. See
RequestFilter.preFilter(javax.ws.rs.ext.FilterContext)
and PreMatchRequestFilter.preMatchFilter(javax.ws.rs.ext.FilterContext)
for more information.
res
- response object to be set.Request.RequestBuilder getRequestBuilder()
setRequest(javax.ws.rs.core.Request)
.
Response.ResponseBuilder getResponseBuilder()
null
if a
response is not available, e.g. in a
RequestFilter
, and has not been set.
A newly built response can be set by calling
setResponse(javax.ws.rs.core.Response)
.
null
.Response.ResponseBuilder createResponse()
setResponse(javax.ws.rs.core.Response)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |