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 creatingAuthorizationHeaderinstances.
-
-
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 StringgetHeaderName()Get the associated header name.protected AuthorizationHeaderparse(String value)Create a header instance from String representation, which may contain multiple values if the header supports them.protected Hparse(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:HeaderFactoryCreate a header instance from String representation, which may contain multiple values if the header supports them.- Specified by:
parsein 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:HeaderFactoryGet the associated header class.- Specified by:
getHeaderClassin classHeaderFactory<AuthorizationHeader>- Returns:
- the header class
-
getHeaderName
protected String getHeaderName()
Description copied from class:HeaderFactoryGet the associated header name.- Specified by:
getHeaderNamein classHeaderFactory<AuthorizationHeader>- Returns:
- the header name
-
parse
protected final H parse(List<String> values) throws MalformedHeaderException
Description copied from class:HeaderFactoryCreate 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:
parsein classHeaderFactory<H extends Header>- Parameters:
values- The string representations.- Returns:
- The parsed header.
- Throws:
MalformedHeaderException- When the value cannot be parsed.
-
-