com.sun.xml.ws.api.message.saaj
Class SAAJMessageHeaders

java.lang.Object
  extended by com.sun.xml.ws.api.message.saaj.SAAJMessageHeaders
All Implemented Interfaces:
MessageHeaders

public class SAAJMessageHeaders
extends Object
implements MessageHeaders


Field Summary
(package private)  Map<javax.xml.soap.SOAPHeaderElement,Header> nonSAAJHeaders
           
(package private)  Map<QName,Integer> notUnderstoodCount
           
(package private)  javax.xml.soap.SOAPMessage sm
           
(package private)  SOAPVersion soapVersion
           
 
Constructor Summary
SAAJMessageHeaders(javax.xml.soap.SOAPMessage sm, SOAPVersion version)
           
 
Method Summary
 boolean add(Header header)
           
 boolean addOrReplace(Header header)
          Replaces an existing Header or adds a new Header.
 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 isUnderstood(Header header)
          True if the header has been explicitly marked understood, false otherwise
 boolean isUnderstood(int index)
           
 boolean isUnderstood(QName name)
          True if the header has been explicitly marked understood, false otherwise
 boolean isUnderstood(String nsUri, String localName)
          True if the header has been explicitly marked understood, false otherwise
 Header remove(QName name)
           
 Header remove(String nsUri, String localName)
           
 void understood(Header header)
           
 void understood(QName qName)
           
 void understood(String nsUri, String localName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

javax.xml.soap.SOAPMessage sm

nonSAAJHeaders

Map<javax.xml.soap.SOAPHeaderElement,Header> nonSAAJHeaders

notUnderstoodCount

Map<QName,Integer> notUnderstoodCount

soapVersion

SOAPVersion soapVersion
Constructor Detail

SAAJMessageHeaders

public SAAJMessageHeaders(javax.xml.soap.SOAPMessage sm,
                          SOAPVersion version)
Method Detail

understood

public void understood(Header header)
Specified by:
understood in interface MessageHeaders

understood

public void understood(String nsUri,
                       String localName)
Specified by:
understood in interface MessageHeaders

understood

public void understood(QName qName)
Specified by:
understood in interface MessageHeaders

isUnderstood

public boolean isUnderstood(Header header)
Description copied from interface: MessageHeaders
True if the header has been explicitly marked understood, false otherwise

Specified by:
isUnderstood in interface MessageHeaders
Returns:

isUnderstood

public boolean isUnderstood(String nsUri,
                            String localName)
Description copied from interface: MessageHeaders
True if the header has been explicitly marked understood, false otherwise

Specified by:
isUnderstood in interface MessageHeaders
Returns:

isUnderstood

public boolean isUnderstood(QName name)
Description copied from interface: MessageHeaders
True if the header has been explicitly marked understood, false otherwise

Specified by:
isUnderstood in interface MessageHeaders
Returns:

isUnderstood

public boolean isUnderstood(int index)

get

public Header get(String nsUri,
                  String localName,
                  boolean markAsUnderstood)
Specified by:
get in interface MessageHeaders

get

public Header get(QName name,
                  boolean markAsUnderstood)
Specified by:
get in interface MessageHeaders

getHeaders

public Iterator<Header> getHeaders(QName headerName,
                                   boolean markAsUnderstood)
Specified by:
getHeaders in interface MessageHeaders

getHeaders

public Iterator<Header> getHeaders(String nsUri,
                                   String localName,
                                   boolean markAsUnderstood)
Specified by:
getHeaders in interface MessageHeaders

getHeaders

public Iterator<Header> getHeaders(String nsUri,
                                   boolean markAsUnderstood)
Description copied from interface: MessageHeaders
Get all headers in specified namespace

Specified by:
getHeaders in interface MessageHeaders
Returns:

add

public boolean add(Header header)
Specified by:
add in interface MessageHeaders

remove

public Header remove(QName name)
Specified by:
remove in interface MessageHeaders

remove

public Header remove(String nsUri,
                     String localName)
Specified by:
remove in interface MessageHeaders

addOrReplace

public boolean addOrReplace(Header header)
Description copied from interface: MessageHeaders
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.

Specified by:
addOrReplace in interface MessageHeaders
Returns:
always true. Don't use the return value.

getUnderstoodHeaders

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

Specified by:
getUnderstoodHeaders in interface MessageHeaders

getNotUnderstoodHeaders

public Set<QName> getNotUnderstoodHeaders(Set<String> roles,
                                          Set<QName> knownHeaders,
                                          WSBinding binding)
Description copied from interface: MessageHeaders
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

Specified by:
getNotUnderstoodHeaders in interface MessageHeaders
Returns:

getHeaders

public Iterator<Header> getHeaders()
Specified by:
getHeaders in interface MessageHeaders


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.