com.sun.xml.ws.api.message
Interface MessageHeaders

All Known Implementing Classes:
HeaderList, SAAJMessageHeaders

public interface MessageHeaders

Interface representing all the headers of a Message


Method Summary
 boolean add(Header header)
           
 boolean addOrReplace(Header header)
          Replaces an existing Header or adds a new Header.
 List<Header> asList()
          Returns Header instances in a List.
 Header get(QName name, boolean markAsUnderstood)
           
 Header get(String nsUri, String localName, boolean markAsUnderstood)
           
 Iterator<Header> getHeaders()
           
 Iterator<Header> getHeaders(QName headerName, boolean markAsUnderstood)
           
 Iterator<Header> getHeaders(String nsUri, boolean markAsUnderstood)
          Get all headers in specified namespace
 Iterator<Header> getHeaders(String nsUri, String localName, boolean markAsUnderstood)
           
 Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding)
          Returns a Set of QNames of headers that satisfy ALL the following conditions: (a) Have mustUnderstand = true (b) have NOT been explicitly marked as understood (c) If roles argument is non-null, the header has isIgnorable = false for the roles argument and SOAP version (d) If non-null binding is passed in, are NOT understood by the binding (e) If (d) is met, the header is NOT in the knownHeaders list passed in
 Set<QName> getUnderstoodHeaders()
          Return a Set of QNames of headers that have been explicitly marked as understood.
 boolean hasHeaders()
           
 boolean isUnderstood(Header header)
          True if the header has been explicitly marked understood, false otherwise
 boolean isUnderstood(QName header)
          True if the header has been explicitly marked understood, false otherwise
 boolean isUnderstood(String nsUri, String header)
          True if the header has been explicitly marked understood, false otherwise
 Header remove(QName name)
           
 Header remove(String nsUri, String localName)
           
 void replace(Header old, Header header)
           
 void understood(Header header)
           
 void understood(QName name)
           
 void understood(String nsUri, String localName)
           
 

Method Detail

understood

void understood(Header header)

understood

void understood(QName name)

understood

void understood(String nsUri,
                String localName)

get

Header get(String nsUri,
           String localName,
           boolean markAsUnderstood)

get

Header get(QName name,
           boolean markAsUnderstood)

getHeaders

Iterator<Header> getHeaders(String nsUri,
                            String localName,
                            boolean markAsUnderstood)

getHeaders

Iterator<Header> getHeaders(String nsUri,
                            boolean markAsUnderstood)
Get all headers in specified namespace

Parameters:
nsUri -
markAsUnderstood -
Returns:

getHeaders

Iterator<Header> getHeaders(QName headerName,
                            boolean markAsUnderstood)

getHeaders

Iterator<Header> getHeaders()

hasHeaders

boolean hasHeaders()

add

boolean add(Header header)

remove

Header remove(QName name)

remove

Header remove(String nsUri,
              String localName)

replace

void replace(Header old,
             Header header)

addOrReplace

boolean addOrReplace(Header header)
Replaces an existing Header or adds a new Header.

Order doesn't matter in headers, so this method does not make any guarantee as to where the new header is inserted.

Returns:
always true. Don't use the return value.

getUnderstoodHeaders

Set<QName> getUnderstoodHeaders()
Return a Set of QNames of headers that have been explicitly marked as understood. If none have been marked, this method could return null


getNotUnderstoodHeaders

Set<QName> getNotUnderstoodHeaders(Set<String> roles,
                                   Set<QName> knownHeaders,
                                   WSBinding binding)
Returns a Set of QNames of headers that satisfy ALL the following conditions: (a) Have mustUnderstand = true (b) have NOT been explicitly marked as understood (c) If roles argument is non-null, the header has isIgnorable = false for the roles argument and SOAP version (d) If non-null binding is passed in, are NOT understood by the binding (e) If (d) is met, the header is NOT in the knownHeaders list passed in

Parameters:
roles -
knownHeaders -
binding -
Returns:

isUnderstood

boolean isUnderstood(Header header)
True if the header has been explicitly marked understood, false otherwise

Parameters:
header -
Returns:

isUnderstood

boolean isUnderstood(QName header)
True if the header has been explicitly marked understood, false otherwise

Parameters:
header -
Returns:

isUnderstood

boolean isUnderstood(String nsUri,
                     String header)
True if the header has been explicitly marked understood, false otherwise

Parameters:
header -
Returns:

asList

List<Header> asList()
Returns Header instances in a List.

Returns:
List containing Header instances


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.