Package akka.http.javadsl.model.headers
Class ModeledCustomHeaderFactory<H extends ModeledCustomHeader>
- java.lang.Object
-
- akka.http.javadsl.model.headers.ModeledCustomHeaderFactory<H>
-
public abstract class ModeledCustomHeaderFactory<H extends ModeledCustomHeader> extends java.lang.Object
Companion class for theModeledCustomHeader
class. It offers methods to createModeledCustomHeader
fromString
orHttpHeader
.
-
-
Constructor Summary
Constructors Constructor Description ModeledCustomHeaderFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description H
create(java.lang.String value)
Creates a newModeledCustomHeader
from the value checking that the format is correct.java.util.Optional<H>
from(HttpHeader header)
Transforms anHttpHeader
to thisModeledCustomHeader
if the name and value are correct.java.lang.String
lowercaseName()
abstract java.lang.String
name()
protected abstract H
parse(java.lang.String value)
Parses the value checking that the format is correct.
-
-
-
Method Detail
-
name
public abstract java.lang.String name()
-
lowercaseName
public java.lang.String lowercaseName()
-
parse
protected abstract H parse(java.lang.String value)
Parses the value checking that the format is correct. It may throw if value is not correct
-
create
public H create(java.lang.String value)
Creates a newModeledCustomHeader
from the value checking that the format is correct. It may throw if value is not correct
-
from
public java.util.Optional<H> from(HttpHeader header)
Transforms anHttpHeader
to thisModeledCustomHeader
if the name and value are correct. It may throw in case of malformed headers
-
-