public class RequestImpl extends Object implements Request
Constructor and Description |
---|
RequestImpl(HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
List<EntityTag> |
convertEtag(List<String> tags) |
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.
|
MultivaluedMap<String,String> |
getFormParameters() |
String |
getMethod()
Get the request method, e.g.
|
Response.ResponseBuilder |
ifMatch(List<EntityTag> ifMatch,
EntityTag eTag) |
Response.ResponseBuilder |
ifModifiedSince(String strDate,
Date lastModified) |
Response.ResponseBuilder |
ifNoneMatch(List<EntityTag> ifMatch,
EntityTag eTag) |
Response.ResponseBuilder |
ifUnmodifiedSince(String strDate,
Date lastModified) |
Variant |
selectVariant(List<Variant> variants)
Select the representation variant that best matches the request.
|
public RequestImpl(HttpRequest request)
public String getMethod()
Request
getMethod
in interface Request
HttpMethod
public MultivaluedMap<String,String> getFormParameters()
public Variant selectVariant(List<Variant> variants) throws IllegalArgumentException
Request
selectVariant
in interface Request
variants
- a list of Variant that describe all of the
available representation variants.IllegalArgumentException
- if variants is empty or nullVariant.VariantListBuilder
public Response.ResponseBuilder ifMatch(List<EntityTag> ifMatch, EntityTag eTag)
public Response.ResponseBuilder ifNoneMatch(List<EntityTag> ifMatch, EntityTag eTag)
public Response.ResponseBuilder evaluatePreconditions(EntityTag eTag)
Request
evaluatePreconditions
in interface Request
eTag
- an ETag for the current state of the resourcepublic Response.ResponseBuilder ifModifiedSince(String strDate, Date lastModified)
public Response.ResponseBuilder ifUnmodifiedSince(String strDate, Date lastModified)
public Response.ResponseBuilder evaluatePreconditions(Date lastModified)
Request
evaluatePreconditions
in interface Request
lastModified
- a date that specifies the modification date of the resourcepublic Response.ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag eTag)
Request
evaluatePreconditions
in interface Request
lastModified
- a date that specifies the modification date of the resourceeTag
- an ETag for the current state of the resourcepublic Response.ResponseBuilder evaluatePreconditions()
Request
Note 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 Request
Copyright © 2018 JBoss by Red Hat. All rights reserved.