Interface MessageWithHeaders

All Known Subinterfaces:
HttpMessage, HttpRequest, HttpResponse

@Experimental @NoImplement @MinMuleVersion("4.10.0") public interface MessageWithHeaders
Generic contract for a message which contains headers
Since:
0.12.0
  • Method Details

    • getHeaderNames

      Collection<String> getHeaderNames()
      Returns:
      all headers name
    • containsHeader

      default boolean containsHeader(String headerName)
      Parameters:
      headerName - name of the header
      Returns:
      whether the header is present in the message
    • getHeaderValue

      String getHeaderValue(String headerName)
      Parameters:
      headerName - name of the header
      Returns:
      first value of the header
    • getHeaderValues

      Collection<String> getHeaderValues(String headerName)
      Parameters:
      headerName - name of the header
      Returns:
      an immutable Collection containing all the values of that headers. If not such headers exists return null, otherwise the collection of header values
    • getHeaders

      org.mule.runtime.api.util.MultiMap<String,String> getHeaders()
      Returns:
      an immutable MultiMap containing all headers