public.javadoc.org.spincast.plugins.request.SpincastRequestRequestContextAddon.html Maven / Gradle / Ivy
Show all versions of spincast-website Show documentation
SpincastRequestRequestContextAddon (org.spincast:spincast-framework 0.9.28 API)
org.spincast.plugins.request
Class SpincastRequestRequestContextAddon<R extends IRequestContext<?>>
- java.lang.Object
-
- org.spincast.plugins.request.SpincastRequestRequestContextAddon<R>
-
- All Implemented Interfaces:
- IRequestRequestContextAddon<R>
public class SpincastRequestRequestContextAddon<R extends IRequestContext<?>>
extends Object
implements IRequestRequestContextAddon<R>
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastRequestRequestContextAddon(R requestContext,
IServer server,
IJsonManager jsonManager,
IXmlManager xmlManager,
ISpincastUtils spincastUtils,
ISpincastConfig spincastConfig,
IETagFactory etagFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
byte[]
getBodyAsByteArray()
The bytes of the request's body.
InputStream
getBodyAsInputStream()
The raw InputStream of the request's body.
String
getBodyAsString()
The request's body as a String, using the UTF-8 encoding.
String
getBodyAsString(String encoding)
The request's body as a String, using the specified encoding.
String
getContentType()
The Content-Type of the request, if any.
ContentTypeDefaults
getContentTypeBestMatch()
Finds the best Content-Type to use for a response
using the "Accept" header of the request.
Date
getDateFromIfModifiedSinceHeader()
Return the value of the If-Modified-Since
header as a Date or null if it doesn't
exist.
Date
getDateFromIfUnmodifiedSinceHeader()
Return the value of the If-Unmodified-Since
header as a Date or null if it doesn't
exist.
protected IETagFactory
getEtagFactory()
List<IETag>
getEtagsFromIfMatchHeader()
Returns the ETags from
the If-Match header, if any.
List<IETag>
getEtagsFromIfNoneMatchHeader()
Returns the ETags from
the If-None-Match header, if any.
protected Object
getExchange()
List<String>
getFormData(String name)
A specific parameter submitted from a FORM via a POST method.
String
getFormDataFirst(String name)
The first (and often only) value of a specific parameter submitted from a FORM via a POST method.
IJsonObject
getFormDatas()
The datas submitted from a FORM via a POST method.
Map<String,List<String>>
getFormDatasAsMap()
The datas submitted from a FORM via a POST method, as
a Map.
String
getFullUrl()
Returns the current full URL, including the queryString, if any.
String
getFullUrl(boolean keepCacheBusters)
Returns the current full URL, including the queryString, if any.
String
getFullUrlOriginal()
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
String
getFullUrlOriginal(boolean keepCacheBusters)
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
protected String
getFullUrlOriginalNoCacheBustersNonDecoded()
protected String
getFullUrlOriginalWithCacheBustersNonDecoded()
String
getFullUrlProxied()
If a reverse proxy has been used, this URL will contain the
scheme, host and port
as forwarded by the reserve proxy, not as seen by the user.
String
getFullUrlProxied(boolean keepCacheBusters)
If a reverse proxy has been used, this URL will contain the
scheme, host and port
as forwarded by the reserve proxy, not as seen by the user.
protected String
getFullUrlProxiedNoCacheBustersNonDecoded()
protected String
getFullUrlProxiedWithCacheBustersNonDecoded()
List<String>
getHeader(String name)
Returns the values of the specified header from the current request or
an empty list if not found.
String
getHeaderFirst(String name)
The first value of the specified header from the current request.
Map<String,List<String>>
getHeaders()
Returns all headers of the current request.
HttpMethod
getHttpMethod()
Gets the request's HTTP method.
<T> T
getJsonBody(Class<T> clazz)
The request's body deserialized to the specified class.
IJsonObject
getJsonBodyAsJsonObject()
The request's body deserialized to a IJsonObject.
Map<String,Object>
getJsonBodyAsMap()
The request's body deserialized to a Map<String, Object>.
protected IJsonManager
getJsonManager()
Locale
getLocaleBestMatch()
Find the best Locale to use for a response
using the "Accept-Language" header of
the request.
String
getPathParam(String name)
A specific value parsed from a dynamic parameter of the route path.
Map<String,String>
getPathParams()
The values parsed from the dynamic parameters of the route path.
String
getQueryString(boolean withQuestionMark)
The queryString of the request.
List<String>
getQueryStringParam(String name)
A specific parameter taken from the queryString of the request.
String
getQueryStringParamFirst(String name)
The first (and often only) value of a specific parameter taken from the
queryString of the request.
Map<String,List<String>>
getQueryStringParams()
The parameters taken from the queryString of the request.
protected R
getRequestContext()
String
getRequestPath()
The path of the request (no querystring).
String
getRequestPath(boolean keepCacheBusters)
The path of the request (no querystring).
protected IServer
getServer()
protected ISpincastConfig
getSpincastConfig()
protected ISpincastUtils
getSpincastUtils()
File
getUploadedFileFirst(String name)
The first (and often only) uploaded file of the specified name.
Map<String,List<File>>
getUploadedFiles()
The uploaded files, with their names as the keys.
List<File>
getUploadedFiles(String name)
The uploaded files of the specified name.
<T> T
getXmlBody(Class<T> clazz)
The request's body deserialized to the specified class.
IJsonObject
getXmlBodyAsJsonObject()
The request's body deserialized to a IJsonObject.
Map<String,Object>
getXmlBodyAsMap()
The request's body deserialized to a Map<String, Object>.
protected IXmlManager
getXmlManager()
boolean
isHTMLShouldBeReturn()
Will return true if the request specifies
that HTML is the most appropriate format
to return.
boolean
isHttps()
Is the request a secure HTTPS one?
boolean
isJsonShouldBeReturn()
Will return true if the request specifies
that Json is the most appropriate format
to return.
boolean
isPlainTextShouldBeReturn()
Will return true if the request specifies
that plain-text is the most appropriate format
to return.
boolean
isXMLShouldBeReturn()
Will return true if the request specifies
that XML is the most appropriate format
to return.
protected Date
parseDateHeader(String headerName)
Returns NULL if the date is not there or not parsable.
protected List<IETag>
parseETagHeader(String headerName)
protected void
parseQueryString()
void
parseQueryStringParams()
protected void
parseRequestPath()
protected void
parseUrl()
protected void
validateFullUrlInfoCache()
-
-
Constructor Detail
-
SpincastRequestRequestContextAddon
@Inject
public SpincastRequestRequestContextAddon(R requestContext,
IServer server,
IJsonManager jsonManager,
IXmlManager xmlManager,
ISpincastUtils spincastUtils,
ISpincastConfig spincastConfig,
IETagFactory etagFactory)
-
Method Detail
-
getRequestContext
protected R getRequestContext()
-
getServer
protected IServer getServer()
-
getJsonManager
protected IJsonManager getJsonManager()
-
getXmlManager
protected IXmlManager getXmlManager()
-
getSpincastUtils
protected ISpincastUtils getSpincastUtils()
-
getSpincastConfig
protected ISpincastConfig getSpincastConfig()
-
getEtagFactory
protected IETagFactory getEtagFactory()
-
getExchange
protected Object getExchange()
-
getHttpMethod
public HttpMethod getHttpMethod()
Description copied from interface: IRequestRequestContextAddon
Gets the request's HTTP method.
- Specified by:
getHttpMethod in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getContentTypeBestMatch
public ContentTypeDefaults getContentTypeBestMatch()
Description copied from interface: IRequestRequestContextAddon
Finds the best Content-Type to use for a response
using the "Accept" header of the request. It will
fallback to ContentTypeDefaults.TEXT if nothing more specific
is found.
- Specified by:
getContentTypeBestMatch in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
isJsonShouldBeReturn
public boolean isJsonShouldBeReturn()
Description copied from interface: IRequestRequestContextAddon
Will return true if the request specifies
that Json is the most appropriate format
to return.
- Specified by:
isJsonShouldBeReturn in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
isHTMLShouldBeReturn
public boolean isHTMLShouldBeReturn()
Description copied from interface: IRequestRequestContextAddon
Will return true if the request specifies
that HTML is the most appropriate format
to return.
- Specified by:
isHTMLShouldBeReturn in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
isXMLShouldBeReturn
public boolean isXMLShouldBeReturn()
Description copied from interface: IRequestRequestContextAddon
Will return true if the request specifies
that XML is the most appropriate format
to return.
- Specified by:
isXMLShouldBeReturn in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
isPlainTextShouldBeReturn
public boolean isPlainTextShouldBeReturn()
Description copied from interface: IRequestRequestContextAddon
Will return true if the request specifies
that plain-text is the most appropriate format
to return.
- Specified by:
isPlainTextShouldBeReturn in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getHeaders
public Map<String,List<String>> getHeaders()
Description copied from interface: IRequestRequestContextAddon
Returns all headers of the current request. A single header can have multiple values.
The implementation is a TreeMap which iscase insensitive for the keys.
The map is immutable.
- Specified by:
getHeaders in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getHeader
public List<String> getHeader(String name)
Description copied from interface: IRequestRequestContextAddon
Returns the values of the specified header from the current request or
an empty list if not found.
The name is case insensitive.
The list is immutable.
- Specified by:
getHeader in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getHeaderFirst
public String getHeaderFirst(String name)
Description copied from interface: IRequestRequestContextAddon
The first value of the specified header from the current request.
The name is case insensitive.
Returns null if the header is not found.
- Specified by:
getHeaderFirst in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFullUrlOriginalNoCacheBustersNonDecoded
protected String getFullUrlOriginalNoCacheBustersNonDecoded()
-
getFullUrlOriginalWithCacheBustersNonDecoded
protected String getFullUrlOriginalWithCacheBustersNonDecoded()
-
getFullUrlProxiedNoCacheBustersNonDecoded
protected String getFullUrlProxiedNoCacheBustersNonDecoded()
-
getFullUrlProxiedWithCacheBustersNonDecoded
protected String getFullUrlProxiedWithCacheBustersNonDecoded()
-
getFullUrlOriginal
public String getFullUrlOriginal()
Description copied from interface: IRequestRequestContextAddon
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
Cache buster codes are removed, if there were any.
Use getFullUrl() to get the current, potentially
forwarded URL.
If a reverse proxy has been used, this URL will contain the
scheme, host and port from the
original URL, as seen by the user.
In general, this is what you want to use in your application.
- Specified by:
getFullUrlOriginal in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFullUrlOriginal
public String getFullUrlOriginal(boolean keepCacheBusters)
Description copied from interface: IRequestRequestContextAddon
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
Use getFullUrl() to get the current, potentially
forwarded URL.
If a reverse proxy has been used, this URL will contain the
scheme, host and port from the
original URL, as seen by the user.
In general, this is what you want to use in your application.
- Specified by:
getFullUrlOriginal in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Parameters:
keepCacheBusters - if true, the returned URL will contain
the cache buster codes, if there were any. The default behavior is to
automatically remove them.
-
getFullUrlProxied
public String getFullUrlProxied()
Description copied from interface: IRequestRequestContextAddon
If a reverse proxy has been used, this URL will contain the
scheme, host and port
as forwarded by the reserve proxy, not as seen by the user.
Cache buster codes are removed, if there were any.
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
In general, you should probably use getFullUrl()
or getFullUrlOriginal() instead of this
one.
- Specified by:
getFullUrlProxied in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFullUrlProxied
public String getFullUrlProxied(boolean keepCacheBusters)
Description copied from interface: IRequestRequestContextAddon
If a reverse proxy has been used, this URL will contain the
scheme, host and port
as forwarded by the reserve proxy, not as seen by the user.
Cache buster codes are removed, if there were any.
If the request has been forwarded, this is going to return the original
URL, not the current, forwarded, one.
In general, you should probably use getFullUrl()
or getFullUrlOriginal() instead of this
one.
- Specified by:
getFullUrlProxied in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Parameters:
keepCacheBusters - if true, the returned URL will contain
the cache buster codes, if there were any. The default behavior is to
automatically remove them.
-
getFullUrl
public String getFullUrl()
Description copied from interface: IRequestRequestContextAddon
Returns the current full URL, including the queryString, if any.
Cache buster codes are removed, if there were any.
In case the request has been forwarded, this will be the *new*,
the current URL. Use getFullUrlOriginal()
to get the original URL, before the request was forwarded.
If a reverse proxy has been used, this URL will contain the
scheme, host and port from the
original URL, as seen by the user.
In general, this is what you want to use in your application.
- Specified by:
getFullUrl in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFullUrl
public String getFullUrl(boolean keepCacheBusters)
Description copied from interface: IRequestRequestContextAddon
Returns the current full URL, including the queryString, if any.
In case the request has been forwarded, this will be the *new*,
the current URL. Use getFullUrlOriginal()
to get the original URL, before the request was forwarded.
If a reverse proxy has been used, this URL will contain the
scheme, host and port from the
original URL, as seen by the user.
In general, this is what you want to use in your application.
- Specified by:
getFullUrl in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Parameters:
keepCacheBusters - if true, the returned URL will contain
the cache buster codes, if there were any. The default behavior is to
automatically remove them.
-
validateFullUrlInfoCache
protected void validateFullUrlInfoCache()
-
parseUrl
protected void parseUrl()
-
parseRequestPath
protected void parseRequestPath()
-
parseQueryString
protected void parseQueryString()
-
parseQueryStringParams
public void parseQueryStringParams()
-
getRequestPath
public String getRequestPath()
Description copied from interface: IRequestRequestContextAddon
The path of the request (no querystring).
- Specified by:
getRequestPath in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getRequestPath
public String getRequestPath(boolean keepCacheBusters)
Description copied from interface: IRequestRequestContextAddon
The path of the request (no querystring).
- Specified by:
getRequestPath in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Parameters:
keepCacheBusters - if true, the returned path will contain
the cache buster codes, if there were any. The default behavior is to
automatically remove them.
-
getQueryString
public String getQueryString(boolean withQuestionMark)
Description copied from interface: IRequestRequestContextAddon
The queryString of the request.
Returns an empty String if there is no queryString.
- Specified by:
getQueryString in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Parameters:
withQuestionMark - if true and the queryString
is not empty, the result will be prefixed with "?".
-
getQueryStringParams
public Map<String,List<String>> getQueryStringParams()
Description copied from interface: IRequestRequestContextAddon
The parameters taken from the queryString of the request.
A queryString parameter may have multiple values.
Returns an empty list if there is no queryString.
The map is immutable.
- Specified by:
getQueryStringParams in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getQueryStringParam
public List<String> getQueryStringParam(String name)
Description copied from interface: IRequestRequestContextAddon
A specific parameter taken from the queryString of the request.
A queryString parameter may have multiple values.
Returns an empty list if the parameter doesn't exist.
The list is immutable.
- Specified by:
getQueryStringParam in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getQueryStringParamFirst
public String getQueryStringParamFirst(String name)
Description copied from interface: IRequestRequestContextAddon
The first (and often only) value of a specific parameter taken from the
queryString of the request.
Returns null if the parameter doesn't exist.
- Specified by:
getQueryStringParamFirst in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getPathParams
public Map<String,String> getPathParams()
Description copied from interface: IRequestRequestContextAddon
The values parsed from the dynamic parameters of the route path.
The map is immutable.
- Specified by:
getPathParams in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getPathParam
public String getPathParam(String name)
Description copied from interface: IRequestRequestContextAddon
A specific value parsed from a dynamic parameter of the route path.
The name is case sensitive, since you have easy control over it.
- Specified by:
getPathParam in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getBodyAsInputStream
public InputStream getBodyAsInputStream()
Description copied from interface: IRequestRequestContextAddon
The raw InputStream of the request's body.
Note that what's read from the InputStream cannot be read again!
- Specified by:
getBodyAsInputStream in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getBodyAsString
public String getBodyAsString()
Description copied from interface: IRequestRequestContextAddon
The request's body as a String, using the UTF-8 encoding.
Note that the characters read cannot be read again!
- Specified by:
getBodyAsString in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getBodyAsString
public String getBodyAsString(String encoding)
Description copied from interface: IRequestRequestContextAddon
The request's body as a String, using the specified encoding.
Note that the characters read cannot be read again!
- Specified by:
getBodyAsString in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getBodyAsByteArray
public byte[] getBodyAsByteArray()
Description copied from interface: IRequestRequestContextAddon
The bytes of the request's body.
Note that the bytes read cannot be read again!
- Specified by:
getBodyAsByteArray in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getJsonBodyAsJsonObject
public IJsonObject getJsonBodyAsJsonObject()
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to a IJsonObject. A valid Json body
is expected.
Note that this can only be called once.
- Specified by:
getJsonBodyAsJsonObject in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getJsonBodyAsMap
public Map<String,Object> getJsonBodyAsMap()
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to a Map<String, Object>. A valid Json body
is expected.
Note that this can only be called once.
- Specified by:
getJsonBodyAsMap in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getJsonBody
public <T> T getJsonBody(Class<T> clazz)
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to the specified class. A valid Json body
is expected.
Note that this can only be called once.
- Specified by:
getJsonBody in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getXmlBodyAsJsonObject
public IJsonObject getXmlBodyAsJsonObject()
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to a IJsonObject. A valid XML body
is expected.
Note that this can only be called once.
- Specified by:
getXmlBodyAsJsonObject in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getXmlBodyAsMap
public Map<String,Object> getXmlBodyAsMap()
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to a Map<String, Object>. A valid XML body
is expected.
Note that this can only be called once.
- Specified by:
getXmlBodyAsMap in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getXmlBody
public <T> T getXmlBody(Class<T> clazz)
Description copied from interface: IRequestRequestContextAddon
The request's body deserialized to the specified class. A valid XML body
is expected.
Note that this can only be called once.
- Specified by:
getXmlBody in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFormDatasAsMap
public Map<String,List<String>> getFormDatasAsMap()
Description copied from interface: IRequestRequestContextAddon
The datas submitted from a FORM via a POST method, as
a Map.
More than one value with the same key is possible.
The names are case sensitive.
This returns an immutable object! You won't
be able to add or remove elements.
- Specified by:
getFormDatasAsMap in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFormDatas
public IJsonObject getFormDatas()
Description copied from interface: IRequestRequestContextAddon
The datas submitted from a FORM via a POST method.
More than one value with the same key is possible.
The names are case sensitive.
This returns a new instance of IJsonObject. Any modification
to the object or to one of its IJsonArray property won't affect the
original form datas.
- Specified by:
getFormDatas in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFormData
public List<String> getFormData(String name)
Description copied from interface: IRequestRequestContextAddon
A specific parameter submitted from a FORM via a POST method.
More than one value with the same name is possible.
The name is case sensitive.
This returns a new instance of List. Any modification
to the list won't affect the original form datas.
- Specified by:
getFormData in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getFormDataFirst
public String getFormDataFirst(String name)
Description copied from interface: IRequestRequestContextAddon
The first (and often only) value of a specific parameter submitted from a FORM via a POST method.
The name is case sensitive.
Returns null if the parameter doesn't exist.
- Specified by:
getFormDataFirst in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getUploadedFiles
public Map<String,List<File>> getUploadedFiles()
Description copied from interface: IRequestRequestContextAddon
The uploaded files, with their names as the keys.
More than one uploaded file with the same name is possible.
The map is immutable.
Returns an empty map if there are no uploadded file.
- Specified by:
getUploadedFiles in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getUploadedFiles
public List<File> getUploadedFiles(String name)
Description copied from interface: IRequestRequestContextAddon
The uploaded files of the specified name.
More than one uploaded file with the same name is possible.
The list is immutable.
Returns an empty list if no uploaded files of this name exists.
- Specified by:
getUploadedFiles in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getUploadedFileFirst
public File getUploadedFileFirst(String name)
Description copied from interface: IRequestRequestContextAddon
The first (and often only) uploaded file of the specified name.
Returns null if no uploaded file of this name exists.
- Specified by:
getUploadedFileFirst in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getLocaleBestMatch
public Locale getLocaleBestMatch()
Description copied from interface: IRequestRequestContextAddon
Find the best Locale to use for a response
using the "Accept-Language" header of
the request.
Returns the default Locale (taken from the configurations)
if nothing more specific is found.
- Specified by:
getLocaleBestMatch in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getContentType
public String getContentType()
Description copied from interface: IRequestRequestContextAddon
The Content-Type of the request, if any.
- Specified by:
getContentType in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Returns:
- the
Content-Type of the request or null
if none was specified.
-
isHttps
public boolean isHttps()
Description copied from interface: IRequestRequestContextAddon
Is the request a secure HTTPS one?
- Specified by:
isHttps in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getEtagsFromIfMatchHeader
public List<IETag> getEtagsFromIfMatchHeader()
Description copied from interface: IRequestRequestContextAddon
Returns the ETags from
the If-Match header, if any.
- Specified by:
getEtagsFromIfMatchHeader in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Returns:
- the
If-Match ETags or an empty list
if there is none.
-
getEtagsFromIfNoneMatchHeader
public List<IETag> getEtagsFromIfNoneMatchHeader()
Description copied from interface: IRequestRequestContextAddon
Returns the ETags from
the If-None-Match header, if any.
- Specified by:
getEtagsFromIfNoneMatchHeader in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
- Returns:
- the
If-None-Match ETags or an empty
list if there is none.
-
getDateFromIfModifiedSinceHeader
public Date getDateFromIfModifiedSinceHeader()
Description copied from interface: IRequestRequestContextAddon
Return the value of the If-Modified-Since
header as a Date or null if it doesn't
exist.
- Specified by:
getDateFromIfModifiedSinceHeader in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
-
getDateFromIfUnmodifiedSinceHeader
public Date getDateFromIfUnmodifiedSinceHeader()
Description copied from interface: IRequestRequestContextAddon
Return the value of the If-Unmodified-Since
header as a Date or null if it doesn't
exist.
- Specified by:
getDateFromIfUnmodifiedSinceHeader in interface IRequestRequestContextAddon<R extends IRequestContext<?>>
Copyright © 2016. All rights reserved.