Package org.refcodes.net
Interface ResponseHeaderFields
-
- All Superinterfaces:
BasicAuthCredentialsAccessor
,BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<ResponseCookie>
,BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
,BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
,BearerAuthCredentialsAccessor
,BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<ResponseCookie>
,BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
,BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty
,HeaderFields<ResponseCookie,ResponseHeaderFields>
,HttpFields<ResponseCookie>
,Map<ResponseCookie,ResponseHeaderFields>
- All Known Implementing Classes:
ResponseHeaderFieldsImpl
public interface ResponseHeaderFields extends HeaderFields<ResponseCookie,ResponseHeaderFields>
TheResponseHeaderFields
reflect the structure of a HTTP header and may be used to represent a HTTP header.
-
-
Nested Class Summary
-
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
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ResponseCookie
addCookie(String aHttpCookie)
Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFields
instance.default String
getLocation()
Gets the Location Response-Header-FieldHeaderField.LOCATION
: "...default String
putLocation(String aLocation)
Sets the Location Response-Header-FieldHeaderField.LOCATION
: "...default String
removeLocation()
Removes the Location Response-Header-FieldHeaderField.LOCATION
: "...default ResponseHeaderFields
witAddCookie(String aHttpCookie)
Builder method forwithAddCookie(ResponseCookie)
default ResponseHeaderFields
withAddCookie(ResponseCookie aCookie)
Builder method for theHeaderFields.addCookie(Cookie)
method.default ResponseHeaderFields
withLocation(String aLocation)
Sets the Location Response-Header-FieldHeaderField.LOCATION
: "...-
Methods inherited from interface org.refcodes.net.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
putBasicAuthCredentials
-
Methods inherited from interface org.refcodes.net.BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
putBearerAuthCredentials
-
Methods inherited from interface org.refcodes.net.HeaderFields
addCookie, addCookie, addTo, addTo, addTo, get, getAcceptCharsets, getAcceptEncodings, getAcceptTypes, getAllCookies, getAllowMethods, getAuthenticate, getAuthorization, getBasicAuth, getBasicAuthCredentials, getBearerAuthCredentials, getContentEncoding, getContentLength, getContentType, getCookies, getFirst, getFirstCookie, getHost, getRequestId, getSessionId, getUnknownAcceptTypes, getUnknownContentTypes, getUserAgent, put, put, put, putAcceptCharsets, putAcceptCharsets, putAcceptEncodings, putAcceptEncodings, putAcceptTypes, putAcceptTypes, putAllowMethods, putAllowMethods, putAuthenticate, putAuthorization, putAuthorization, putAuthorization, putBasicAuthCredentials, putBasicAuthRequired, putBearerAuthCredentials, putContentEncoding, putContentLength, putContentType, putContentType, putHost, putRequestId, putSessionId, putUserAgent, remove, removeAcceptCharsets, removeAcceptEncodings, removeAcceptTypes, removeAllowMethods, removeAuthenticate, removeAuthorization, removeBasicAuthCredentials, removeBasicAuthenticate, removeBearerAuthCredentials, removeContentEncoding, removeContentLength, removeContentType, removeHost, removeRequestId, removeSessionId, removeUserAgent, toBasicAuthRealm, toHeaderFields, toHttpCookies, withAcceptCharsets, withAcceptCharsets, withAcceptEncodings, withAcceptEncodings, withAcceptTypes, withAcceptTypes, withAddCookie, withAddTo, withAddTo, withAddTo, withAllowMethods, withAllowMethods, withAuthenticate, withAuthorization, withAuthorization, withAuthorization, withBasicAuthCredentials, withBasicAuthCredentials, withBasicAuthRequired, withBearerAuthCredentials, withBearerAuthCredentials, withContentEncoding, withContentLength, 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
-
-
-
-
Method Detail
-
addCookie
default ResponseCookie addCookie(String aHttpCookie)
Adds an individual server-side cookie to be sent to the client to thisResponseHeaderFields
instance. The server-side cookies are retrieved from theHeaderField.SET_COOKIE
Header-Field. WITH THE METHODHeaderFields.getAllCookies()
andHeaderFields.getCookies(String)
as well asHeaderFields.getFirstCookie(String)
ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE
). COOKIES SET VIAHeaderFields.addCookie(String, String)
ORHeaderFields.withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIE
Header-Field.- Specified by:
addCookie
in interfaceHeaderFields<ResponseCookie,ResponseHeaderFields>
- Parameters:
aHttpCookie
- The HTTP-CookieString
to be paresd as a cookie.- Returns:
- The resulting cookie builder being added which can be modified
affecting(!) this
ResponseHeaderFields
instance!
-
witAddCookie
default ResponseHeaderFields witAddCookie(String aHttpCookie)
Builder method forwithAddCookie(ResponseCookie)
- Parameters:
aHttpCookie
- The cookie to be added.- Returns:
- The implementing instance as of the builder pattern.
-
withAddCookie
default ResponseHeaderFields withAddCookie(ResponseCookie aCookie)
Builder method for theHeaderFields.addCookie(Cookie)
method. WITH THE METHODHeaderFields.getAllCookies()
andHeaderFields.getCookies(String)
as well asHeaderFields.getFirstCookie(String)
ONLY THE COOKIES SENT BY THE CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELDHeaderField.COOKIE
). COOKIES SET VIAHeaderFields.addCookie(String, String)
ORHeaderFields.withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE COOKIES BEING SET SERVER-SIDE ARE PUT IN THEHeaderField.SET_COOKIE
Header-Field.- Specified by:
withAddCookie
in interfaceHeaderFields<ResponseCookie,ResponseHeaderFields>
- Parameters:
aCookie
- The cookie to be added.- Returns:
- This
ResponseHeaderFields
instance to continue building up the Header-Fields.
-
getLocation
default String getLocation()
Gets the Location Response-Header-FieldHeaderField.LOCATION
: "... The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. ..."
-
putLocation
default String putLocation(String aLocation)
Sets the Location Response-Header-FieldHeaderField.LOCATION
: "... The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. types ..."- Parameters:
aLocation
- The according location.- Returns:
- The replaced element (if any, else null).
- See Also:
- "https://tools.ietf.org/html/rfc2616#page-135"
-
withLocation
default ResponseHeaderFields withLocation(String aLocation)
Sets the Location Response-Header-FieldHeaderField.LOCATION
: "... The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. types ..."- Parameters:
aLocation
- The according location.- Returns:
- This object as of the Builder-Pattern.
- See Also:
- "https://tools.ietf.org/html/rfc2616#page-135"
-
removeLocation
default String removeLocation()
Removes the Location Response-Header-FieldHeaderField.LOCATION
: "... The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. types ..."- Returns:
- The value being removed (or null if none was set).
- See Also:
- "https://tools.ietf.org/html/rfc2616#page-135"
-
-