|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.HttpHeader.Builder<T>
public abstract static class HttpHeader.Builder<T extends HttpHeader.Builder>
HttpHeader message builder.
| Field Summary | |
|---|---|
protected HttpHeader |
packet
|
| Constructor Summary | |
|---|---|
HttpHeader.Builder()
|
|
| Method Summary | |
|---|---|
T |
chunked(boolean isChunked)
Set true, if this HttpPacket content will be transferred
in chunking mode, or false if case of fixed-length message. |
T |
contentLength(long contentLength)
Set the content-length of this HttpPacket. |
T |
contentType(String contentType)
Set the content-type of this HttpPacket. |
T |
header(Header header,
String value)
Add the HTTP mime header. |
T |
header(String name,
String value)
Add the HTTP mime header. |
T |
protocol(Protocol protocol)
Set the HTTP message protocol version. |
T |
protocol(String protocol)
Set the HTTP message protocol version. |
T |
upgrade(String upgrade)
Set the HTTP upgrade type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HttpHeader packet
| Constructor Detail |
|---|
public HttpHeader.Builder()
| Method Detail |
|---|
public final T protocol(Protocol protocol)
protocol - Protocolpublic final T protocol(String protocol)
protocol - protocol version in format "HTTP/1.x".public final T chunked(boolean isChunked)
HttpPacket content will be transferred
in chunking mode, or false if case of fixed-length message.
isChunked - true, if this HttpPacket content
will be transferred in chunking mode, or false if case
of fixed-length message.public final T contentLength(long contentLength)
HttpPacket. Applicable only in case
of fixed-length HTTP message.
contentLength - the content-length of this HttpPacket.
Applicable only in case of fixed-length HTTP message.public final T contentType(String contentType)
HttpPacket.
contentType - the content-type of this HttpPacket.public final T upgrade(String upgrade)
upgrade - the type of upgrade.
public final T header(String name,
String value)
name - the mime header name.value - the mime header value.
public final T header(Header header,
String value)
header - the mime Header.value - the mime header value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||