|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.inject.RequestInjectee
public class RequestInjectee
Proxiable wrapper for request scoped Request instance.
| Constructor Summary | |
|---|---|
RequestInjectee()
|
|
| Method Summary | |
|---|---|
Response.ResponseBuilder |
evaluatePreconditions()
Evaluate request preconditions for a resource that does not currently exist. |
Response.ResponseBuilder |
evaluatePreconditions(Date lastModified)
Evaluate request preconditions based on the passed in value. |
Response.ResponseBuilder |
evaluatePreconditions(Date lastModified,
EntityTag eTag)
Evaluate request preconditions based on the passed in value. |
Response.ResponseBuilder |
evaluatePreconditions(EntityTag eTag)
Evaluate request preconditions based on the passed in value. |
String |
getMethod()
Get the request method, e.g. |
Variant |
selectVariant(List<Variant> variants)
Select the representation variant that best matches the request. |
void |
set(Request request)
Set wrapped instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestInjectee()
| Method Detail |
|---|
public void set(Request request)
request - actual request instance.public String getMethod()
Request
getMethod in interface RequestHttpMethod
public Variant selectVariant(List<Variant> variants)
throws IllegalArgumentException
Requestnull in case there is no matching variant in the list.
More explicit variants are chosen ahead of less explicit ones. A vary header is computed from the supplied list and automatically added to the response.
selectVariant in interface Requestvariants - a list of Variant that describe all of the available representation
variants.
null if there's no match.
IllegalArgumentException - if variants is empty or null.Variant.VariantListBuilderpublic Response.ResponseBuilder evaluatePreconditions(EntityTag eTag)
Request
evaluatePreconditions in interface RequesteTag - an ETag for the current state of the resource
null if the preconditions are met or a ResponseBuilder set with
the appropriate status if the preconditions are not met. A returned
ResponseBuilder will include an ETag header set with the value of eTag,
provided none of the precondition evaluation has failed, in which case
the ETag header would not be included and the status code of the returned
ResponseBuilder would be set to Response.Status.PRECONDITION_FAILED.public Response.ResponseBuilder evaluatePreconditions(Date lastModified)
Request
evaluatePreconditions in interface RequestlastModified - a date that specifies the modification date of the resource
null if the preconditions are met or a ResponseBuilder set with
the appropriate status if the preconditions are not met.
public Response.ResponseBuilder evaluatePreconditions(Date lastModified,
EntityTag eTag)
Request
evaluatePreconditions in interface RequestlastModified - a date that specifies the modification date of the resourceeTag - an ETag for the current state of the resource
null if the preconditions are met or a ResponseBuilder set with
the appropriate status if the preconditions are not met. A returned
ResponseBuilder will include an ETag header set with the value of eTag,
provided none of the precondition evaluation has failed, in which case
the ETag header would not be included and the status code of the returned
ResponseBuilder would be set to Response.Status.PRECONDITION_FAILED.public Response.ResponseBuilder evaluatePreconditions()
RequestNote that both preconditions If-None-Match: * and
If-None-Match: something will always be considered to
have been met and it is the applications responsibility
to enforce any additional method-specific semantics. E.g. a
PUT on a resource that does not exist might succeed whereas
a GET on a resource that does not exist would likely result
in a 404 response. It would be the responsibility of the application to
generate the 404 response.
evaluatePreconditions in interface Requestnull if the preconditions are met or a ResponseBuilder set with
the appropriate status if the preconditions are not met.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||