Package net.officefloor.server.http.impl
Class SerialisableHttpRequestHeaders
- java.lang.Object
-
- net.officefloor.server.http.impl.SerialisableHttpRequestHeaders
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<HttpHeader>
,HttpRequestHeaders
public class SerialisableHttpRequestHeaders extends java.lang.Object implements HttpRequestHeaders, java.io.Serializable
Serializable
HttpRequestHeaders
.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SerialisableHttpRequestHeaders(int length, java.lang.Iterable<HttpHeader> headers)
Loads theHttpHeader
instances.SerialisableHttpRequestHeaders(java.util.List<HttpHeader> headers)
Instantiate fromList
ofHttpHeader
instances.SerialisableHttpRequestHeaders(HttpRequestHeaders httpRequestHeaders)
Instantiate fromHttpRequestHeaders
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHeader
getHeader(java.lang.CharSequence name)
Obtains the firstHttpHeader
by the name.java.lang.Iterable<HttpHeader>
getHeaders(java.lang.CharSequence name)
Obtains all theHttpHeader
instances by the name.HttpHeader
headerAt(int index)
Obtains theHttpHeader
at the index.java.util.Iterator<HttpHeader>
iterator()
int
length()
Obtains the number ofHttpHeader
instances.
-
-
-
Constructor Detail
-
SerialisableHttpRequestHeaders
public SerialisableHttpRequestHeaders(HttpRequestHeaders httpRequestHeaders)
Instantiate fromHttpRequestHeaders
.- Parameters:
httpRequestHeaders
-HttpRequestHeaders
.
-
SerialisableHttpRequestHeaders
public SerialisableHttpRequestHeaders(java.util.List<HttpHeader> headers)
Instantiate fromList
ofHttpHeader
instances.- Parameters:
headers
-List
ofHttpHeader
instances.
-
SerialisableHttpRequestHeaders
protected SerialisableHttpRequestHeaders(int length, java.lang.Iterable<HttpHeader> headers)
Loads theHttpHeader
instances.- Parameters:
length
- Number ofHttpHeader
instances.headers
-Iterable
over theHttpHeader
instances.
-
-
Method Detail
-
iterator
public java.util.Iterator<HttpHeader> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<HttpHeader>
-
getHeader
public HttpHeader getHeader(java.lang.CharSequence name)
Description copied from interface:HttpRequestHeaders
Obtains the firstHttpHeader
by the name.- Specified by:
getHeader
in interfaceHttpRequestHeaders
- Parameters:
name
- Name of theHttpHeader
.- Returns:
- First
HttpHeader
ornull
if noHttpHeader
by the name.
-
getHeaders
public java.lang.Iterable<HttpHeader> getHeaders(java.lang.CharSequence name)
Description copied from interface:HttpRequestHeaders
Obtains all theHttpHeader
instances by the name.- Specified by:
getHeaders
in interfaceHttpRequestHeaders
- Parameters:
name
- Name of theHttpHeader
instances.- Returns:
- All
HttpHeader
instances by the name.
-
headerAt
public HttpHeader headerAt(int index)
Description copied from interface:HttpRequestHeaders
Obtains theHttpHeader
at the index.- Specified by:
headerAt
in interfaceHttpRequestHeaders
- Parameters:
index
- Index of theHttpHeader
.- Returns:
HttpHeader
at the index.
-
length
public int length()
Description copied from interface:HttpRequestHeaders
Obtains the number ofHttpHeader
instances.- Specified by:
length
in interfaceHttpRequestHeaders
- Returns:
- Number of
HttpHeader
instances.
-
-