Package org.forgerock.http.header
Class AuthorizationHeader.Factory
- java.lang.Object
-
- org.forgerock.http.header.HeaderFactory<H>
-
- org.forgerock.http.header.AuthorizationHeader.Factory
-
- Enclosing class:
- AuthorizationHeader
public static class AuthorizationHeader.Factory extends HeaderFactory<H>
A factory for creatingAuthorizationHeader
instances.
-
-
Field Summary
-
Fields inherited from class org.forgerock.http.header.HeaderFactory
FACTORIES, HEADER_NAMES
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<AuthorizationHeader>
getHeaderClass()
Get the associated header class.protected String
getHeaderName()
Get the associated header name.protected AuthorizationHeader
parse(String value)
Create a header instance from String representation, which may contain multiple values if the header supports them.protected H
parse(List<String> values)
Create a header instance from a list of String representations, each of which may in turn contain multiple values if the header supports them.-
Methods inherited from class org.forgerock.http.header.HeaderFactory
parse
-
-
-
-
Method Detail
-
parse
protected AuthorizationHeader parse(String value) throws MalformedHeaderException
Description copied from class:HeaderFactory
Create a header instance from String representation, which may contain multiple values if the header supports them.- Specified by:
parse
in classHeaderFactory<AuthorizationHeader>
- Parameters:
value
- The string representation.- Returns:
- The parsed header.
- Throws:
MalformedHeaderException
- When the value cannot be parsed.
-
getHeaderClass
protected Class<AuthorizationHeader> getHeaderClass()
Description copied from class:HeaderFactory
Get the associated header class.- Specified by:
getHeaderClass
in classHeaderFactory<AuthorizationHeader>
- Returns:
- the header class
-
getHeaderName
protected String getHeaderName()
Description copied from class:HeaderFactory
Get the associated header name.- Specified by:
getHeaderName
in classHeaderFactory<AuthorizationHeader>
- Returns:
- the header name
-
parse
protected final H parse(List<String> values) throws MalformedHeaderException
Description copied from class:HeaderFactory
Create a header instance from a list of String representations, each of which may in turn contain multiple values if the header supports them.- Specified by:
parse
in classHeaderFactory<H extends Header>
- Parameters:
values
- The string representations.- Returns:
- The parsed header.
- Throws:
MalformedHeaderException
- When the value cannot be parsed.
-
-