HttpMessage type.
HttpMessage wrapper.
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHeader(final Header
the header to append. header)Implements org. |
| public void | addHeader(final String
the name of the header. name, final Object the value of the header, taken as the value's value)Object#toString().Implements org. |
| public boolean | containsHeader(final String
the header name to check for. name)Implements org. |
| public int | countHeaders(final String
the header name to check for. name)Implements org. |
| public Header | getFirstHeader(final String
the name of the header to return. name)Implements org. |
| public Header | getHeader(final String
the name of the header to get name)Implements org. |
| public Header[] | getHeaders(final String
the name of the headers to return. name)Implements org. |
| public Header[] | getHeaders()
Implements org. |
| public Header | getLastHeader(final String
the name of the header to return. name)Implements org. |
| pack-priv T | |
| public ProtocolVersion | getVersion()
Implements org. null when not available.
|
| public Iterator | headerIterator()
Implements org. |
| public Iterator | headerIterator(final String
the name of the headers over which to iterate, or
name)null for all headersImplements org. |
| public boolean | removeHeader(final Header
the header to remove. header)Implements org. |
| public boolean | removeHeaders(final String
The name of the headers to remove. name)Implements org. |
| public void | setHeader(final Header
the header to set. header)Implements org. |
| public void | setHeader(final String
the name of the header. name, final Object the value of the header, taken as the value's value)Object#toString().Implements org. |
| public void | setHeaders(final Header...
the array of headers to set. headers)Implements org. |
| public void | setVersion(final ProtocolVersion version)
Implements org. |
| public String |
| message | back to summary |
|---|---|
| private final T message | |
| AbstractMessageWrapper | back to summary |
|---|---|
| public AbstractMessageWrapper(final T message) | |
| addHeader | back to summary |
|---|---|
| public void addHeader(final Header header) Implements org. Doc from org. Adds a header to this message. The header will be appended to the end of the list. | |
| addHeader | back to summary |
|---|---|
| public void addHeader(final String name, final Object value) Implements org. Doc from org. Adds a header to this message. The header will be appended to the end of the list.
| |
| containsHeader | back to summary |
|---|---|
| public boolean containsHeader(final String name) Implements org. Doc from org. Checks if a certain header is present in this message. Header values are ignored. | |
| countHeaders | back to summary |
|---|---|
| public int countHeaders(final String name) Implements org. Doc from org. Checks if a certain header is present in this message and how many times. | |
| getFirstHeader | back to summary |
|---|---|
| public Header getFirstHeader(final String name) Implements org. Doc from org. Returns the first header with a specified name of this message. Header
values are ignored. If there is more than one matching header in the
message the first element of | |
| getHeader | back to summary |
|---|---|
| public Header getHeader(final String name) throws ProtocolException Implements org. Doc from org. Gets single first header with the given name. Header name comparison is case insensitive.
| |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders(final String name) Implements org. Doc from org. Returns all the headers with a specified name of this message. Header values are ignored. Headers are ordered in the sequence they will be sent over a connection. | |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders() Implements org. Doc from org. Returns all the headers of this message. Headers are ordered in the sequence they will be sent over a connection. | |
| getLastHeader | back to summary |
|---|---|
| public Header getLastHeader(final String name) Implements org. Doc from org. Returns the last header with a specified name of this message. Header values
are ignored. If there is more than one matching header in the message the
last element of | |
| getMessage | back to summary |
|---|---|
| pack-priv T getMessage() | |
| getVersion | back to summary |
|---|---|
| public ProtocolVersion getVersion() Implements org. Doc from org. Returns protocol version or For incoming messages it represents protocol version this message was transmitted with. For outgoing messages it represents a hint what protocol version should be used to transmit the message.
| |
| headerIterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator of all the headers. | |
| headerIterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator of the headers with a given name. | |
| removeHeader | back to summary |
|---|---|
| public boolean removeHeader(final Header header) Implements org. Doc from org. Removes a header from this message. | |
| removeHeaders | back to summary |
|---|---|
| public boolean removeHeaders(final String name) Implements org. Doc from org. Removes all headers with a certain name from this message. | |
| setHeader | back to summary |
|---|---|
| public void setHeader(final Header header) Implements org. Doc from org. Overwrites the first header with the same name. The new header will be appended to the end of the list, if no header with the given name can be found. | |
| setHeader | back to summary |
|---|---|
| public void setHeader(final String name, final Object value) Implements org. Doc from org. Overwrites the first header with the same name. The new header will be appended to the end of the list, if no header with the given name can be found.
| |
| setHeaders | back to summary |
|---|---|
| public void setHeaders(final Header... headers) Implements org. Doc from org. Overwrites all the headers in the message. | |
| setVersion | back to summary |
|---|---|
| public void setVersion(final ProtocolVersion version) Implements org. Doc from org. Sets protocol version. For incoming messages it represents protocol version this message was transmitted with. For outgoing messages it represents a hint what protocol version should be used to transmit the message.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |