public interface MessageHeaders
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsHeader(String name)
Checks if a certain header is present in this message.
|
int |
countHeaders(String name)
Checks if a certain header is present in this message and how many times.
|
Header |
getFirstHeader(String name)
Returns the first header with a specified name of this message.
|
Header |
getHeader(String name)
Gets single first header with the given name.
|
Header[] |
getHeaders()
Returns all the headers of this message.
|
Header[] |
getHeaders(String name)
Returns all the headers with a specified name of this message.
|
Header |
getLastHeader(String name)
Returns the last header with a specified name of this message.
|
Iterator<Header> |
headerIterator()
Returns an iterator of all the headers.
|
Iterator<Header> |
headerIterator(String name)
Returns an iterator of the headers with a given name.
|
boolean containsHeader(String name)
name - the header name to check for.int countHeaders(String name)
name - the header name to check for.Header getFirstHeader(String name)
getHeaders(String) is returned.
If there is no matching header in the message null is
returned.name - the name of the header to return.name
or null if no such header could be found.Header getHeader(String name) throws ProtocolException
Header name comparison is case insensitive.
name - the name of the header to getnullProtocolException - in case multiple headers with the given name are found.Header[] getHeaders()
Header[] getHeaders(String name)
name - the name of the headers to return.name.Header getLastHeader(String name)
getHeaders(String) is returned. If there is no
matching header in the message null is returned.name - the name of the header to return.name.
or null if no such header could be found.Iterator<Header> headerIterator()
Iterator<Header> headerIterator(String name)
name - the name of the headers over which to iterate, or
null for all headersCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.