Module org.refcodes.web
Package org.refcodes.web
Interface HeaderFields<C extends Cookie,B extends HeaderFields<C,B>>
- Type Parameters:
C- the generic typeB- the generic type
- All Superinterfaces:
HttpFields<B>,Map<String,List<String>>
- All Known Implementing Classes:
AbstractHeaderFields,RequestHeaderFields,ResponseHeaderFields
The
HeaderFields reflect the structure of a HTTP header and may be
used to represent a HTTP header.-
Nested Class Summary
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAdds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance.Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance.Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance.default voidaddTo(HeaderField aHeaderField, String aValue) Adds the value to the given Header-Field.default voidaddTo(HeaderField aHeaderField, String... aValues) Adds the given values to the according Header-Field.default voidaddTo(HeaderField aHeaderField, List<String> aValues) Adds the given values to the according Header-Field.get(HeaderField aHeaderField) Gets the values for the according Header-Field.Gets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...default List<ContentEncoding>Gets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...Gets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:default List<ContentType>Gets the Accept request-Header-FieldHeaderField.ACCEPT: "...Retrieves an array of cookies sent by the client stored in thisRequestHeaderFieldsinstance.default List<HttpMethod>Gets the Allow entity-Header-FieldHeaderField.ALLOW: "...default StringGets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "...default StringGets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default StringRetrieves the WWW-Authenticate field for Basic-Authentication.default BasicAuthCredentialsRetrieves theBasicAuthCredentialsfrom the request (or null if there are none such credentials).default BearerAuthCredentialsRetrieves theBearerAuthCredentialsfrom the request (or null if there are none such credentials).default ContentEncodingGets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default IntegerGets the Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "...default ContentTypeGets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE: "...getCookies(String aCookieName) Retrieves an individual cookie sent by the client stored in thisRequestHeaderFieldsinstance.default StringgetFirst(HeaderField aHeaderField) Gets the first value of the according Header-Field.default CgetFirstCookie(String aCookieName) Same asgetAllCookies()though just returning the first cookie.default StringgetHost()Gets the Host request-Header-FieldHeaderField.HOST: "...default StringGets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.default StringGets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.Gets the unresolvable (unknown) Accept request-Header-FieldHeaderField.ACCEPT.Gets the unresolvable (unknown) Content-Type request-Header-FieldHeaderField.CONTENT_TYPE.default StringGets the User-Agent request-Header-FieldHeaderField.USER_AGENT: "...put(HeaderField aHeaderField, String aValue) Puts (replaces) the currently set Header-Field values with the provided one.put(HeaderField aHeaderField, String... aValues) Puts (replaces) the currently set Header-Field values with the provided ones.put(HeaderField aHeaderField, List<String> aValues) Puts (replaces) the currently set Header-Field values with the provided ones.putAcceptCharsets(String... aAcceptCharsets) Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...putAcceptCharsets(List<String> aAcceptCharsets) Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...default List<ContentEncoding>putAcceptEncodings(List<ContentEncoding> aEncodings) Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default List<ContentEncoding>putAcceptEncodings(ContentEncoding... aEncodings) Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...putAcceptLanguages(List<Locale> aLanguages) Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:putAcceptLanguages(Locale... aLanguages) Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:default List<ContentType>putAcceptTypes(List<? extends HttpMediaType> aHttpMediaTypes) Sets the Accept request-Header-FieldHeaderField.ACCEPT.default List<ContentType>putAcceptTypes(HttpMediaType... aHttpMediaType) Sets the Accept request-Header-FieldHeaderField.ACCEPT.default List<HttpMethod>putAllowMethods(List<HttpMethod> aHttpMethods) Sets the Allow entity-Header-FieldHeaderField.ALLOW: "...default List<HttpMethod>putAllowMethods(HttpMethod... aHttpMethods) Sets the Allow entity-Header-FieldHeaderField.ALLOW: "...default StringputAuthenticate(String aAuthenticate) Sets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "...default StringputAuthorization(String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default StringputAuthorization(String aAuthType, String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default StringputAuthorization(AuthType aAuthType, String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default BasicAuthCredentialsputBasicAuthCredentials(String aUserName, String aSecret) Sets theBasicAuthCredentialsfrom the user name and the secret for the Basic-Authentication credentials property.default BasicAuthCredentialsputBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials) Sets theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.default StringputBasicAuthRequired(String aRealm) Sets the WWW-Authenticate field for Basic-Authentication with the given realm.default BearerAuthCredentialsputBearerAuthCredentials(String aBearerAuthCredentials) Sets theBearerAuthCredentialsfrom the token for the bearer auth credentials property.default BearerAuthCredentialsputBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials) Sets theBearerAuthCredentials(token) for HTTP bearer authentication.default ContentEncodingputContentEncoding(ContentEncoding aEncoding) Sets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default IntegerputContentLength(Integer aContentLength) Sets the Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "...default ContentTypeputContentType(HttpMediaType aHttpMediaType) Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE.default ContentTypeputContentType(MediaType aMediaType, Map<String, String> aParameters) Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. : "...default StringSets the Host request-Header-FieldHeaderField.HOST: "...default StringputRequestId(String aRequestId) Sets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.default StringputSessionId(String aSessionId) Sets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.default StringputUserAgent(String aUserAgent) Sets the User-Agent request-Header-FieldHeaderField.USER_AGENT: "...remove(HeaderField aHeaderField) Removes the values from the given Header-Field.Removes the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...default List<ContentEncoding>Removes the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...Removes the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE: "...default List<ContentType>Removes the Accept request-Header-FieldHeaderField.ACCEPT: "...default List<HttpMethod>Removes the Allow entity-Header-FieldHeaderField.ALLOW: "...default StringRemoves the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "...default StringRemoves the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default BasicAuthCredentialsRemoves theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.default StringRemoves the WWW-Authenticate field for Basic-Authentication.default BearerAuthCredentialsRemoves theBearerAuthCredentials(token) for HTTP bearer authentication.default ContentEncodingRemoves the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default IntegerRemoves he Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "...default ContentTypeRemoves the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. : "...default StringRemoves the Host request-Header-FieldHeaderField.HOST: "...default StringRemoves the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.default StringRemoves the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.default StringRemoves he User-Agent request-Header-FieldHeaderField.USER_AGENT: "...default StringExtracts the real (if any) from theHeaderField.WWW_AUTHENTICATEHeader-Field (getAuthenticate()).default voidtoHeaderFields(Map<String, List<String>> aToFields) Copies the Header-Fields into the providedMap.default String[]Creates a HTTP Header-Field value from the herein storedCookieinstances.default BwithAcceptCharsets(String... aAcceptCharsets) Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...default BwithAcceptCharsets(List<String> aAcceptCharsets) Sets the the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "...default BwithAcceptEncodings(List<ContentEncoding> aEncodings) Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default BwithAcceptEncodings(ContentEncoding... aEncodings) Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default BwithAcceptLanguages(List<Locale> aLanguages) Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE: "...default BwithAcceptLanguages(Locale... aLanguages) Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:default BwithAcceptTypes(List<? extends HttpMediaType> aHttpMediaType) Sets the Accept request-Header-FieldHeaderField.ACCEPT.default BwithAcceptTypes(HttpMediaType... aHttpMediaType) Sets the Accept request-Header-FieldHeaderField.ACCEPT.default HeaderFields<C,B> withAddCookie(C aCookie) Builder method for theaddCookie(Cookie)method.default HeaderFields<C,B> withAddCookie(String aCookieName, String aValue) Builder method for theaddCookie(String, String)method.default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String aValue) Builder method foraddTo(HeaderField, String).default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String... aValues) Builder method foraddTo(HeaderField, String...).default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, List<String> aValues) Builder method foraddTo(HeaderField, List).default BwithAllowMethods(List<HttpMethod> aHttpMethods) Sets the Allow entity-Header-FieldHeaderField.ALLOW: "...default BwithAllowMethods(HttpMethod... aHttpMethods) Sets the Allow entity-Header-FieldHeaderField.ALLOW: "...default BwithAuthenticate(String aAuthenticate) Sets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "...default BwithAuthorization(String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default BwithAuthorization(String aAuthType, String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default BwithAuthorization(AuthType aAuthType, String aAuthorize) Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "...default BwithBasicAuthCredentials(String aUserName, String aSecret) Sets the user name and secret (password) for HTTP Basic-Authentication.default BwithBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials) Sets theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.default BwithBasicAuthRequired(String aRealm) Sets the WWW-Authenticate field for Basic-Authentication with the given realm.default BwithBearerAuthCredentials(String aToken) Sets the token (secret) for HTTP bearer authentication.default BwithBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials) Sets theBearerAuthCredentials(token) for HTTP bearer authentication.default BwithContentEncoding(ContentEncoding aEncoding) Sets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "...default BwithContentLength(Integer aContentLength) Sets he Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "...default BwithContentType(HttpMediaType aHttpMediaType) Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE.default BwithContentType(MediaType aMediaType, Map<String, String> aParameters) Sets the Content-Type'sMediaTypeand the parameters for the HTTP body.default BSets the Host request-Header-FieldHeaderField.HOST: "...default HeaderFields<C,B> withPut(HeaderField aHeaderField, String aValue) Builder method forput(HeaderField, String).default HeaderFields<C,B> withPut(HeaderField aHeaderField, String... aValues) Builder method forput(HeaderField, String...).default HeaderFields<C,B> withPut(HeaderField aHeaderField, List<String> aValues) Builder method forput(HeaderField, List).default BwithRequestId(String aRequestId) Sets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.default BwithSessionId(String aSessionId) Sets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.default BwithUserAgent(String aUserAgent) Sets he User-Agent request-Header-FieldHeaderField.USER_AGENT: "...Methods inherited from interface org.refcodes.web.HttpFields
addTo, addTo, addTo, addTo, addTo, addTo, getFirst, getFirst, put, put, put, put, toField, toField, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withPut, withPut, withPut, withPut, withPut, withPutMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
BASIC_REALM
- See Also:
-
-
Method Details
-
getAllowMethods
Gets the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Returns:
- The HTTP-Methods allowed for the resource.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAllowMethods
Sets the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Parameters:
aHttpMethods- The HTTP-Methods allowed for the resource.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAllowMethods
Sets the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Parameters:
aHttpMethods- The HTTP-Methods allowed for the resource.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAllowMethods
Sets the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Parameters:
aHttpMethods- The HTTP-Methods allowed for the resource.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAllowMethods
Sets the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Parameters:
aHttpMethods- The HTTP-Methods allowed for the resource.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeAllowMethods
Removes the Allow entity-Header-FieldHeaderField.ALLOW: "... The Allow entity-Header-Field lists the set of methods supported by the resource ... The purpose of this field is strictly to inform the recipient of valid methods associated with the resource. An Allow header field MUST be present in a 405 (Method Not Allowed) response ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getContentLength
Gets the Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "... The Content-Length request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Returns:
- The according user agent.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putContentLength
Sets the Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "... The Content-Length request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Parameters:
aContentLength- The according user agent.- Returns:
- the string
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withContentLength
Sets he Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "... The Content-Length request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Parameters:
aContentLength- The according user agent.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeContentLength
Removes he Content-Length request-Header-FieldHeaderField.CONTENT_LENGTH: "... The Content-Length request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getContentType
Gets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE: "... The Content-Type entity-Header-Field indicates the media type of the entity-body sent to the recipient ..."- Returns:
- The media type being used for the body.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getUnknownContentTypes
Gets the unresolvable (unknown) Content-Type request-Header-FieldHeaderField.CONTENT_TYPE. E.g. the ones which cannot be mapped by the enumerationMediaType.- Returns:
- the unknown content types
- See Also:
-
putContentType
Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Content-Type entity-Header-Field indicates the media type of the entity-body sent to the recipient ..."- Parameters:
aHttpMediaType- The media type used for the body.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putContentType
Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. : "... The Content-Type entity-Header-Field indicates the media type of the entity-body sent to the recipient ..."- Parameters:
aMediaType- The media type used for the body.aParameters- The Content-Type's parameters.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withContentType
Sets the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Content-Type entity-Header-Field indicates the media type of the entity-body sent to the recipient ..."- Parameters:
aHttpMediaType- The media type used for the body.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withContentType
Sets the Content-Type'sMediaTypeand the parameters for the HTTP body.- Parameters:
aMediaType- The media type used for the body.aParameters- The Content-Type's parameters.- Returns:
- This object as of the Builder-Pattern.
-
removeContentType
Removes the Content-Type entity-Header-FieldHeaderField.CONTENT_TYPE. : "... The Content-Type entity-Header-Field indicates the media type of the entity-body sent to the recipient ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getAcceptTypes
Gets the Accept request-Header-FieldHeaderField.ACCEPT: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired ..."- Returns:
- The expected (supported) kinds of
MediaTypeand the according parameters (being actually instances of theContentTypetype). - See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getUnknownAcceptTypes
Gets the unresolvable (unknown) Accept request-Header-FieldHeaderField.ACCEPT. E.g. the ones which cannot be mapped by the enumerationMediaType.- Returns:
- the unknown accept types
- See Also:
-
putAcceptTypes
Sets the Accept request-Header-FieldHeaderField.ACCEPT. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types ..."- Parameters:
aHttpMediaType- The accordingHttpMediaTypeAccessor.HttpMediaTypeProvider.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAcceptTypes
Sets the Accept request-Header-FieldHeaderField.ACCEPT. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types ..."- Parameters:
aHttpMediaTypes- The accordingHttpMediaTypeAccessor.HttpMediaTypeProvider.- Returns:
- The replaced element (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptTypes
Sets the Accept request-Header-FieldHeaderField.ACCEPT. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types ..."- Parameters:
aHttpMediaType- The accordingHttpMediaTypeAccessor.HttpMediaTypeProvider.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptTypes
Sets the Accept request-Header-FieldHeaderField.ACCEPT. You may pass aMediaTypeor aContentTypeinstance as them both implement theHttpMediaTypeAccessor.HttpMediaTypeProviderinterface: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types ..."- Parameters:
aHttpMediaType- The accordingHttpMediaTypeAccessor.HttpMediaTypeProvider.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeAcceptTypes
Removes the Accept request-Header-FieldHeaderField.ACCEPT: "... The Accept request-Header-Field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getAcceptCharsets
Gets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Returns:
- The Accept-Charset expected by a client from a server.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAcceptCharsets
Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Parameters:
aAcceptCharsets- The Accept-Charset expected by a client from a server.- Returns:
- The replaced elements (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAcceptCharsets
Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Parameters:
aAcceptCharsets- The Accept-Charset expected by a client from a server.- Returns:
- The replaced elements (if any, else null).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptCharsets
Sets the the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Parameters:
aAcceptCharsets- The Accept-Charset expected by a client from a server.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptCharsets
Sets the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Parameters:
aAcceptCharsets- The Accept-Charset expected by a client from a server.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeAcceptCharsets
Removes the Accept-Charset request-Header-FieldHeaderField.ACCEPT_CHARSET. "... The Accept-Charset request-Header-Field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getAcceptEncodings
Gets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Returns:
- The expected (supported) kinds of encodings.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
- "https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Content-Encoding"
-
putAcceptEncodings
Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncodings- The according encodings.- Returns:
- the list
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
- "https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Content-Encoding"
-
putAcceptEncodings
Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncodings- The according encodings.- Returns:
- the list
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
- "https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Content-Encoding"
-
withAcceptEncodings
Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncodings- The according encodings.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
- "https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Content-Encoding"
-
withAcceptEncodings
Sets the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncodings- The according encodings.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
- "https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Content-Encoding"
-
removeAcceptEncodings
Removes the the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getAcceptLanguages
Gets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:- Returns:
- The expected (supported) kinds of languages.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAcceptLanguages
Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:- Parameters:
aLanguages- The according languages.- Returns:
- the list
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAcceptLanguages
Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:- Parameters:
aLanguages- The according languages.- Returns:
- the list
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptLanguages
Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE:- Parameters:
aLanguages- The according languages.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAcceptLanguages
Sets the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE: "... The Accept-Language request HTTP header advertises which languages the client is able to understand, and which locale variant is preferred ..."- Parameters:
aLanguages- The according languages.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language"
-
removeAcceptLanguages
Removes the the Content-Encoding entity-Header-FieldHeaderField.ACCEPT_LANGUAGE: "... The Accept-Language request HTTP header advertises which languages the client is able to understand, and which locale variant is preferred ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language"
-
getContentEncoding
Gets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Returns:
- The communication partner's HTTP body's encoding.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putContentEncoding
Sets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncoding- The HTTP body's content encoding.- Returns:
- the content encoding
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withContentEncoding
Sets the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Parameters:
aEncoding- The HTTP body's content encoding.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeContentEncoding
Removes the Content-Encoding entity-Header-FieldHeaderField.CONTENT_ENCODING: "... The Content-Encoding entity-Header-Field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type Header-Field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getUserAgent
Gets the User-Agent request-Header-FieldHeaderField.USER_AGENT: "... The User-Agent request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Returns:
- The according user agent.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putUserAgent
Sets the User-Agent request-Header-FieldHeaderField.USER_AGENT: "... The User-Agent request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Parameters:
aUserAgent- The according user agent.- Returns:
- the string
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withUserAgent
Sets he User-Agent request-Header-FieldHeaderField.USER_AGENT: "... The User-Agent request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Parameters:
aUserAgent- The according user agent.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeUserAgent
Removes he User-Agent request-Header-FieldHeaderField.USER_AGENT: "... The User-Agent request-Header-Field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getHost
Gets the Host request-Header-FieldHeaderField.HOST: "... The Host request-Header-Field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource ..."- Returns:
- The according host.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putHost
Sets the Host request-Header-FieldHeaderField.HOST: "... The Host request-Header-Field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource ..."- Parameters:
aHost- The according host.- Returns:
- the string
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withHost
Sets the Host request-Header-FieldHeaderField.HOST: "... The Host request-Header-Field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource ..."- Parameters:
aHost- The according host.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeHost
Removes the Host request-Header-FieldHeaderField.HOST: "... The Host request-Header-Field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getRequestId
Gets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.- Returns:
- The according Request-Correlation TID.
-
putRequestId
Sets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.- Parameters:
aRequestId- The according Request-Correlation TID.- Returns:
- The value being removed (or null if none was set).
-
withRequestId
Sets the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.- Parameters:
aRequestId- The according Request-Correlation TID.- Returns:
- This object as of the Builder-Pattern.
-
removeRequestId
Removes the (interprocess) Request-Correlation TID fieldHeaderField.REQUEST_ID: A Request-Correlation TID is an TID to uniquely identify an entity (request) across multiple systems.- Returns:
- The value being removed (or null if none was set).
-
getSessionId
Gets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.- Returns:
- The according Session-Correlation TID.
-
putSessionId
Sets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.- Parameters:
aSessionId- The according Session-Correlation TID.- Returns:
- The value being removed (or null if none was set).
-
withSessionId
Sets the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.- Parameters:
aSessionId- The according Session-Correlation TID.- Returns:
- This object as of the Builder-Pattern.
-
removeSessionId
Removes the (interprocess) Session-Correlation TID fieldHeaderField.SESSION_ID: A Session-Correlation TID is an TID to uniquely identify an entity (session) across multiple systems.- Returns:
- The value being removed (or null if none was set).
-
getAuthenticate
Gets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "... The WWW-Authenticate Response-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Returns:
- The according WWW-Authenticate field.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
putAuthenticate
Sets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "... The WWW-Authenticate Response-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthenticate- The according WWW-Authenticate field.- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
withAuthenticate
Sets the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "... The WWW-Authenticate Response-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthenticate- The according WWW-Authenticate field.- Returns:
- This object as of the Builder-Pattern.
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
removeAuthenticate
Removes the WWW-Authenticate Response-Header-FieldHeaderField.WWW_AUTHENTICATE: "... The WWW-Authenticate Response-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
-
- "https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
-
getBasicAuth
Retrieves the WWW-Authenticate field for Basic-Authentication. If not set or another kind of authorization is set, then null is returned. UsegetAuthenticate()to get the field's value no matter which kind of authenticate is used.- Returns:
- The WWW-Authenticate field for Basic-Authentication or null if there is no value for the given field or it does not declare Basic-Authentication.
-
putBasicAuthRequired
Sets the WWW-Authenticate field for Basic-Authentication with the given realm.- Parameters:
aRealm- The realm to be set for Basic-Authentication of the WWW-authenticate field.- Returns:
- The value being removed (or null if none was set).
-
withBasicAuthRequired
Sets the WWW-Authenticate field for Basic-Authentication with the given realm.- Parameters:
aRealm- The realm to be set for Basic-Authentication of the WWW-authenticate field.- Returns:
- This object as of the Builder-Pattern.
-
removeBasicAuthenticate
Removes the WWW-Authenticate field for Basic-Authentication. If not set or another kind of authorization is set, then null is returned and the field is not removed. UseremoveAuthenticate()to remove the field's value no matter which kind of authenticate is used.- Returns:
- The value being removed (or null if none or none for basic authentication was set).
-
toBasicAuthRealm
Extracts the real (if any) from theHeaderField.WWW_AUTHENTICATEHeader-Field (getAuthenticate()).- Returns:
- The basic authenticate's realm or null if there is none such.
-
getAuthorization
Gets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Returns:
- The according Authorize field.
-
putAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthType- TheAuthTypeto be used.aAuthorize- The according Authorize field.- Returns:
- The value being removed (or null if none was set).
-
withAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthorize- The according Authorize field.aAuthType- TheAuthTypeto be used.- Returns:
- This object as of the Builder-Pattern.
-
putAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthType- TheAuthTypeto be used.aAuthorize- The according Authorize field.- Returns:
- The value being removed (or null if none was set).
-
withAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthorize- The according Authorize field.aAuthType- TheAuthTypeto be used.- Returns:
- This object as of the Builder-Pattern.
-
putAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthorize- The according Authorize field.- Returns:
- The value being removed (or null if none was set).
-
withAuthorization
Sets the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Parameters:
aAuthorize- The according Authorize field.- Returns:
- This object as of the Builder-Pattern.
-
removeAuthorization
Removes the Authorize Request-Header-FieldHeaderField.AUTHORIZATION: "... The Authorize Request-Header-Field MUST be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI ..."- Returns:
- The value being removed (or null if none was set).
-
getBearerAuthCredentials
Retrieves theBearerAuthCredentialsfrom the request (or null if there are none such credentials). Throw anUnauthorizedExceptionin case you do not agree with the credentials you find there.- Returns:
- The
BearerAuthCredentialsstored by the bearer authentication credentials property (or null if there are none such credentials).
-
putBearerAuthCredentials
Sets theBearerAuthCredentialsfrom the token for the bearer auth credentials property.- Parameters:
aBearerAuthCredentials- The password to be stored by theBearerAuthCredentialsproperty.
-
putBearerAuthCredentials
default BearerAuthCredentials putBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials) Sets theBearerAuthCredentials(token) for HTTP bearer authentication.- Parameters:
aBearerAuthCredentials- The credentials (token).
-
withBearerAuthCredentials
Sets theBearerAuthCredentials(token) for HTTP bearer authentication.- Parameters:
aBearerAuthCredentials- The credentials (token).- Returns:
- This object as of the Builder-Pattern.
-
withBearerAuthCredentials
Sets the token (secret) for HTTP bearer authentication.- Parameters:
aToken- The password part of the credentials.- Returns:
- This object as of the Builder-Pattern.
-
removeBearerAuthCredentials
Removes theBearerAuthCredentials(token) for HTTP bearer authentication.- Returns:
- The value being removed (or null if none was set).
-
getBasicAuthCredentials
Retrieves theBasicAuthCredentialsfrom the request (or null if there are none such credentials). Throw anUnauthorizedExceptionin case you do not agree with the credentials you find there.- Returns:
- The
BasicAuthCredentialsstored by the basic authentication credentials property (or null if there are none such credentials).
-
putBasicAuthCredentials
Sets theBasicAuthCredentialsfrom the user name and the secret for the Basic-Authentication credentials property.- Parameters:
aUserName- The user name to be stored by theBasicAuthCredentialsproperty.aSecret- The password to be stored by theBasicAuthCredentialsproperty.
-
putBasicAuthCredentials
Sets theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.- Parameters:
aBasicAuthCredentials- The credentials (user name and secret).
-
withBasicAuthCredentials
Sets theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.- Parameters:
aBasicAuthCredentials- The credentials (user name and secret).- Returns:
- This object as of the Builder-Pattern.
-
withBasicAuthCredentials
Sets the user name and secret (password) for HTTP Basic-Authentication.- Parameters:
aUserName- The user name part of the credentials.aSecret- The password part of the credentials.- Returns:
- This object as of the Builder-Pattern.
-
removeBasicAuthCredentials
Removes theBasicAuthCredentials(user name and secret) for HTTP Basic-Authentication.- Returns:
- The value being removed (or null if none was set).
-
get
Gets the values for the according Header-Field.- Parameters:
aHeaderField- The Header-Field- Returns:
- The list of values.
-
getFirst
Gets the first value of the according Header-Field.- Parameters:
aHeaderField- The a Header-Field- Returns:
- The first value.
-
addTo
Adds the value to the given Header-Field.- Parameters:
aHeaderField- The Header-Field.aValue- The a value to be added.
-
withAddTo
Builder method foraddTo(HeaderField, String).- Parameters:
aHeaderField- the Header-FieldaValue- the value- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
addTo
Adds the given values to the according Header-Field.- Parameters:
aHeaderField- The Header-Field.aValues- The a values to be added.
-
addTo
Adds the given values to the according Header-Field.- Parameters:
aHeaderField- The Header-Field.aValues- The a values to be added.
-
withAddTo
Builder method foraddTo(HeaderField, String...).- Parameters:
aHeaderField- the Header-FieldaValues- the values- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
withAddTo
Builder method foraddTo(HeaderField, List).- Parameters:
aHeaderField- the Header-FieldaValues- the values- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
put
Puts (replaces) the currently set Header-Field values with the provided one.- Parameters:
aHeaderField- The a Header-Field.aValue- The value with which to replace the currently set Header-Field values.- Returns:
- The
Listwith the previously set Header-Field values.
-
withPut
Builder method forput(HeaderField, String).- Parameters:
aHeaderField- The Header-Field.aValue- The value.- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
put
Puts (replaces) the currently set Header-Field values with the provided ones.- Parameters:
aHeaderField- The a Header-Field.aValues- The values with which to replace the currently set Header-Field values.- Returns:
- The
Listwith the previously set Header-Field values.
-
put
Puts (replaces) the currently set Header-Field values with the provided ones.- Parameters:
aHeaderField- The a Header-Field.aValues- The values with which to replace the currently set Header-Field values.- Returns:
- The
Listwith the previously set Header-Field values.
-
withPut
Builder method forput(HeaderField, String...).- Parameters:
aHeaderField- The Header-Field.aValues- The values.- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
withPut
Builder method forput(HeaderField, List).- Parameters:
aHeaderField- The Header-Field.aValues- The values.- Returns:
- This instance as of the Builder-Pattern to chain operations.
-
remove
Removes the values from the given Header-Field.- Parameters:
aHeaderField- The a Header-Field for which to remove the values.- Returns:
- The
Listwith the previously set Header-Field values.
-
addCookie
Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance. The server-side cookies are retrieved from theHeaderField.SET_COOKIEHeader-Field. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aHttpCookie- The HTTP-CookieStringto be paresd as a cookie.- Returns:
- The resulting cookie builder being added which can be modified
affecting(!) this
ResponseHeaderFieldsinstance! - Throws:
IllegalArgumentException- thrown in case the HTTP-CookieStringcannot be parsed as a cookie.
-
addCookie
Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance. The server-side cookies are retrieved from theHeaderField.SET_COOKIEHeader-Field. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookieName- The name for the cookie to be added.aValue- The value of the cookie to be added.- Returns:
- The resulting cookie builder being added which can be modified
affecting(!) this
ResponseHeaderFieldsinstance!
-
addCookie
Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFieldsinstance. The server-side cookies are retrieved from theHeaderField.SET_COOKIEHeader-Field. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookie- The cookie to be added.- Returns:
- The resulting cookie builder being added which can be modified
affecting(!) this
ResponseHeaderFieldsinstance!
-
withAddCookie
Builder method for theaddCookie(String, String)method. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookieName- The name for the cookie to be added.aValue- The value of the cookie to be added.- Returns:
- This
ResponseHeaderFieldsinstance to continue building up the Header-Fields.
-
withAddCookie
Builder method for theaddCookie(Cookie)method. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookie- The cookie to be added.- Returns:
- This
ResponseHeaderFieldsinstance to continue building up the Header-Fields.
-
getAllCookies
Retrieves an array of cookies sent by the client stored in thisRequestHeaderFieldsinstance. If no cookie has been found, then an empty array is returned. The client-side cookies are retrieved from theHeaderField.COOKIEHeader-Field. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field. According to the Netscape cookie_spec (https://curl.haxx.se/rfc/cookie_spec.html) the entire FILE=VALUE string of a cookie is a sequence of characters excluding semi-colon, comma and white space.- Returns:
- An array containing the cookies (key/value) stored in this
RequestHeaderFieldsinstance.
-
getCookies
Retrieves an individual cookie sent by the client stored in thisRequestHeaderFieldsinstance. The client-side cookies are retrieved from theHeaderField.COOKIEHeader-Field. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookieName- The name of the cookie to be retrieved.- Returns:
- The values of the cookie found for the according name.
-
getFirstCookie
Same asgetAllCookies()though just returning the first cookie. WITH THE METHODgetAllCookies()andgetCookies(String)as well asgetFirstCookie(String)ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE). COOKIES SET VIAaddCookie(String, String)ORwithAddCookie(String, String)CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIEHeader-Field.- Parameters:
aCookieName- The name of the cookie to be retrieved.- Returns:
- The first cookie found for the according name or null if none such cookies exist.
-
toHttpCookies
Creates a HTTP Header-Field value from the herein storedCookieinstances.- Returns:
- The text representing the HTTP Header-Field for the herein stored cookies.
-
toHeaderFields
Copies the Header-Fields into the providedMap. This is useful when some underlying system provides an own instance of Header-Fields to be filled.- Parameters:
aToFields- TheMapwhere to copy the Header-Fields to.
-