HttpPacket, which represents HTTP message header. There are 2 subtypes of this class:
HttpRequestPacket and HttpResponsePacket.
HttpRequestPacket, HttpResponsePacket
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| private AttributeHolder | |
| private final AttributeHolder | |
| private static final byte[] | |
| private boolean | chunkingAllowed
Is chunking allowed to be used or not. |
| private final List | |
| protected long | |
| protected final ContentType. | |
| pack-priv Buffer | |
| protected final MimeHeaders | |
| protected boolean | |
| protected boolean | |
| protected boolean | isContentBroken
true if HTTP message payload is broken due to inappropriate Transfer-Encoding or Content-Encoding settings. |
| private boolean | |
| protected boolean | |
| private boolean | isIgnoreContentModifiers
true if parser has to ignore "Transfer-Encoding" and "Content-Encoding" headers and act as none of them were specified. |
| protected boolean | |
| protected Protocol | |
| protected final DataChunk | |
| protected boolean | |
| private final byte[] | |
| private final byte[] | |
| private TransferEncoding | |
| protected final DataChunk |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void | addHeader(final String name, final String value)
Implements org. Add the HTTP mime header. |
| public void | addHeader(final String name, final HeaderValue value)
Implements org. Add the HTTP mime header. |
| public void | addHeader(final Header header, final String value)
Implements org. Add the HTTP mime header. |
| public void | addHeader(final Header header, final HeaderValue value)
Implements org. Add the HTTP mime header. |
| public boolean | containsHeader(final String name)
Implements org. Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise. |
| public boolean | containsHeader(final Header header)
Implements org. Returns true, if the mime |
| protected void | extractContentEncoding(final DataChunk
container for the content-type value. value)Obtain content-encoding value and mark it as serialized. |
| protected void | |
| public AttributeHolder | getAttributes()
Implements org. Get associated |
| public String | |
| protected List | |
| public List | |
| public long | Returns: the content-length of thisHttpPacket. Applicable only in case of fixed-length HTTP message.Get the content-length of this |
| public String | |
| protected ContentType | |
| public String | getHeader(final String name)
Implements org. Get the value, of the specific HTTP mime header. |
| public String | getHeader(final Header header)
Implements org. Get the value, of the specific HTTP mime header. |
| public MimeHeaders | getHeaders()
Implements org. Get all |
| public HttpHeader | Returns: this HttpHeader object.Implements abstract org. Returns this HttpHeader object. |
| protected HttpPacketParsing | getParsingState()
Returns: the parsing state of this HTTP header, or null if the message is complete or shouldn't be parsed at all |
| public abstract ProcessingState | |
| public Protocol | |
| public DataChunk | Returns: the HTTP message protocol version asDataChunk (avoiding creation of a String object). The result
format is "HTTP/1.x".Get the HTTP message protocol version as |
| public String | Returns: the HTTP message protocol version. The result format is "HTTP/1.x".Get the HTTP message protocol version. |
| public byte[] | |
| public TransferEncoding | Returns: theTransferEncoding, responsible for the parsing/serialization of the HTTP message contentGet the |
| public final String | |
| public DataChunk | |
| private String | |
| private String | |
| private final String | |
| private final String | |
| private final boolean | |
| private final boolean | |
| private final boolean | |
| private final boolean | |
| public final HttpContent. | |
| public HttpTrailer. | |
| public boolean | Returns: true, if thisHttpPacket content will be transferred in chunking mode, or false if
case of fixed-length message.Returns true, if this |
| public boolean | Returns: true if chunking is allowed for this header.Return |
| public boolean | Returns: true, if this HttpHeader has been already serialized, and onlyHttpContent messages
might be serialized for this HttpPacket.Is this HttpHeader written? |
| public boolean | Returns: true, if HTTP packet payload was detected as broken due to unexpected error occurred during Transfer-Encoding or Content-Encoding processing. Otherwise returns false.Returns true, if HTTP packet payload was detected as broken due to unexpected error occurred during Transfer-Encoding or Content-Encoding processing. |
| protected final boolean | |
| public boolean | |
| public boolean | Returns: true, if HTTP message, represented by this header still expects additional content basing either on content-length or chunking information. false is returned if content no additional content data is expected.Returns true, if HTTP message, represented by this header still expects additional content basing either on content-length or chunking information. |
| public final boolean | Returns: true.Implements abstract org. Returns true. |
| public boolean | isIgnoreContentModifiers()
Returns: true if parser has to ignore "Transfer-Encoding" and "Content-Encoding" headers and act as none of them were specified. |
| public abstract boolean | Returns: true, if the current HttpHeader represent HTTP request message, or false otherwise.Returns true, if the current HttpHeader represent HTTP request message, or false otherwise. |
| public boolean | isSecure()
Returns: |
| public boolean | Returns: true, if either application or HTTP core part is not interested in parsing the rest of this HTTP message content and waits for the next HTTP message to come on thisorg..
Otherwise returns false.Returns true, if either application or HTTP core part is not interested in parsing the rest of this HTTP
message content and waits for the next HTTP message to come on this |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| public boolean | |
| protected void | makeContentLengthHeader(final long
default content-length value. defaultLength)Makes sure content-length header is present. |
| protected void | makeTransferEncodingHeader(final String
default transfer-encoding value. defaultValue)Makes sure transfer-encoding header is present. |
| protected void | |
| public void | |
| protected void | |
| public void | setCharacterEncoding(final String
the encoding. charset)Set the character encoding of this HTTP message. |
| public void | setChunked(boolean
true, if this isChunked)HttpPacket content will be transferred in chunking mode, or
false if case of fixed-length message.Set true, if this |
| public void | setChunkingAllowed(boolean
true if chunked transfer-encoding is allowed, otherwise returns
false.Indicate whether or not chunking may be used by this header. |
| public void | setCommitted(final boolean
true, if this HttpHeader has been already serialized, and only
isCommitted)HttpContent messages might be serialized for this HttpPacket.Is this HttpHeader written? |
| public void | setContentBroken(final boolean
true, means that HTTP packet payload was detected as broken due to unexpected error occurred
during Transfer-Encoding or Content-Encoding processing. isBroken)Set flag, which is set to true, means that HTTP packet payload was detected as broken due to unexpected error occurred during Transfer-Encoding or Content-Encoding processing. |
| protected final void | |
| public void | |
| public void | setContentLengthLong(final long
the content-length of this contentLength)HttpPacket. Applicable only in case of fixed-length HTTP
message.Set the content-length of this |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public void | setHeader(final String name, final String value)
Implements org. Set the value, of the specific HTTP mime header. |
| public void | setHeader(final String name, final HeaderValue value)
Implements org. Set the value, of the specific HTTP mime header. |
| public void | setHeader(final Header header, final String value)
Implements org. Set the value, of the specific HTTP mime header. |
| public void | setHeader(final Header header, final HeaderValue value)
Implements org. Set the value, of the specific HTTP mime header. |
| pack-priv void | |
| public void | setIgnoreContentModifiers(boolean isIgnoreContentModifiers)
Set true if parser has to ignore "Transfer-Encoding" and "Content-Encoding" headers and act as none of them were specified. |
| public void | |
| public void | setSecure(boolean
true if secure, otherwise false.Sets the secure status of this HTTP message. |
| public void | setSkipRemainder(boolean
true means that we're not interested in parsing the rest of this HTTP message content
and wait for the next HTTP message to come on this isSkipRemainder)org..Set flag, which is set to true, means that we're not interested in parsing the rest of this HTTP message
content and wait for the next HTTP message to come on this |
| protected void | setTransferEncoding(TransferEncoding
the transferEncoding)TransferEncoding, responsible for the parsing/serialization of the HTTP message
content.Set the |
| public final void | |
| private boolean | setValueBasedOnHeader(final String name, final String value)
Set internal fields for special header names. |
| private boolean | setValueBasedOnHeader(final Header header, final String value)
Set internal fields for special header names. |