Package org.refcodes.net
Class RequestHeaderFieldsImpl
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>
-
- org.refcodes.net.AbstractHttpFields<T>
-
- org.refcodes.net.AbstractHeaderFields<RequestCookie,RequestHeaderFields>
-
- org.refcodes.net.RequestHeaderFieldsImpl
-
- All Implemented Interfaces:
java.util.Map<RequestCookie,RequestHeaderFields>
,BasicAuthCredentialsAccessor
,BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<RequestCookie>
,BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
,BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
,BearerAuthCredentialsAccessor
,BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<RequestCookie>
,BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
,BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty
,HeaderFields<RequestCookie,RequestHeaderFields>
,HttpFields<RequestCookie>
,RequestHeaderFields
public class RequestHeaderFieldsImpl extends AbstractHeaderFields<RequestCookie,RequestHeaderFields> implements RequestHeaderFields
Implementation of theHeaderFields
interface.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.net.BasicAuthCredentialsAccessor
BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>>, BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.BearerAuthCredentialsAccessor
BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B extends BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B>>, BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator, BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty
-
-
Field Summary
-
Fields inherited from interface org.refcodes.net.HeaderFields
BASIC_REALM
-
-
Constructor Summary
Constructors Constructor Description RequestHeaderFieldsImpl()
Instantiates a new request Header-Fields impl.RequestHeaderFieldsImpl(java.util.Map<java.lang.String,java.util.List<java.lang.String>> aFromHeaderFields)
Instantiates a new request Header-Fields impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RequestCookie
createCookie(java.lang.String aHttpCookie)
Creates aCookie
from the given HTTP cookieString
as retrieved from the according Header-Field.protected RequestCookie
createCookie(java.lang.String aCookieName, java.lang.String aValue)
Creates a plainCookie
with the given name and value.protected java.lang.String
getCookieFieldName()
The Header-Field name for theCookie
elements.-
Methods inherited from class org.refcodes.net.AbstractHeaderFields
addCookie, addCookie, addTo, entrySet, get, getAllCookies, isCommaSeparatedHeaderField, keySet, put, putAll, toHeaderField, toHeaderFields
-
Methods inherited from class org.refcodes.net.AbstractHttpFields
copyHttpFields
-
Methods inherited from interface org.refcodes.net.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
putBasicAuthCredentials
-
Methods inherited from interface org.refcodes.net.BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
putBearerAuthCredentials
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface org.refcodes.net.HeaderFields
addCookie, addCookie, addTo, addTo, addTo, get, getAcceptCharsets, getAcceptEncodings, getAcceptTypes, getAllCookies, getAllowMethods, getAuthenticate, getAuthorize, getBasicAuth, getBasicAuthCredentials, getBearerAuthCredentials, getContentEncoding, getContentType, getCookies, getFirst, getFirstCookie, getHost, getRequestId, getSessionId, getUnknownAcceptTypes, getUnknownContentTypes, getUserAgent, put, put, put, putAcceptCharsets, putAcceptCharsets, putAcceptEncodings, putAcceptEncodings, putAcceptTypes, putAcceptTypes, putAllowMethods, putAllowMethods, putAuthenticate, putAuthorize, putAuthorize, putAuthorize, putBasicAuthCredentials, putBasicAuthRequired, putBearerAuthCredentials, putContentEncoding, putContentType, putContentType, putHost, putRequestId, putSessionId, putUserAgent, remove, removeAcceptCharsets, removeAcceptEncodings, removeAcceptTypes, removeAllowMethods, removeAuthenticate, removeAuthorize, removeBasicAuthCredentials, removeBasicAuthenticate, removeBearerAuthCredentials, removeContentEncoding, removeContentType, removeHost, removeRequestId, removeSessionId, removeUserAgent, toBasicAuthRealm, toHeaderFields, toHttpCookies, withAcceptCharsets, withAcceptCharsets, withAcceptEncodings, withAcceptEncodings, withAcceptTypes, withAcceptTypes, withAddCookie, withAddCookie, withAddTo, withAddTo, withAddTo, withAllowMethods, withAllowMethods, withAuthenticate, withAuthorize, withAuthorize, withAuthorize, withBasicAuthCredentials, withBasicAuthCredentials, withBasicAuthRequired, withBearerAuthCredentials, withBearerAuthCredentials, withContentEncoding, withContentType, withContentType, withHost, withPut, withPut, withPut, withRequestId, withSessionId, withUserAgent
-
Methods inherited from interface org.refcodes.net.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, withPut
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.net.RequestHeaderFields
addCookie
-
-
-
-
Constructor Detail
-
RequestHeaderFieldsImpl
public RequestHeaderFieldsImpl()
Instantiates a new request Header-Fields impl.
-
RequestHeaderFieldsImpl
public RequestHeaderFieldsImpl(java.util.Map<java.lang.String,java.util.List<java.lang.String>> aFromHeaderFields)
Instantiates a new request Header-Fields impl.- Parameters:
aFromHeaderFields
- the from Header-Fields
-
-
Method Detail
-
getCookieFieldName
protected java.lang.String getCookieFieldName()
The Header-Field name for theCookie
elements. The Header-Field name differs from the context, e.g. when setting aCookie
server-side or when retrieving aCookie
client-side.- Specified by:
getCookieFieldName
in classAbstractHeaderFields<RequestCookie,RequestHeaderFields>
- Returns:
- The Header-Field where the
Cookie
elements are stored.
-
createCookie
protected RequestCookie createCookie(java.lang.String aCookieName, java.lang.String aValue)
Creates a plainCookie
with the given name and value.- Specified by:
createCookie
in classAbstractHeaderFields<RequestCookie,RequestHeaderFields>
- Parameters:
aCookieName
- The name of theCookie
.aValue
- The value for theCookie
- Returns:
- The
Cookie
with the given name and value.
-
createCookie
protected RequestCookie createCookie(java.lang.String aHttpCookie)
Creates aCookie
from the given HTTP cookieString
as retrieved from the according Header-Field.- Specified by:
createCookie
in classAbstractHeaderFields<RequestCookie,RequestHeaderFields>
- Parameters:
aHttpCookie
- The text of the Header-Field for the cookie to be created.- Returns:
- The
Cookie
with the given cookie properties.
-
-