FileDocCategorySizeDatePackage
Header.javaAPI DocExample4182Tue May 29 16:56:46 BST 2007com.sun.xml.ws.security.impl.policy

Header

public class Header extends com.sun.xml.ws.policy.PolicyAssertion implements com.sun.xml.ws.security.policy.Header
author
K.Venugopal@sun.com

Fields Summary
String
name
String
uri
int
hashCode
Constructors Summary
public Header(String localName, String uri)
Creates a new instance of Header

               
           
        Map<QName,String> attrs = this.getAttributes();
        attrs.put(NAME,localName);
        attrs.put(URI,uri);
    
public Header(com.sun.xml.ws.policy.sourcemodel.AssertionData name, Collection nestedAssertions, com.sun.xml.ws.policy.AssertionSet nestedAlternative)

        super(name,nestedAssertions,nestedAlternative);
        
        
        String tmp = this.getAttributeValue(NAME);
        if(tmp != null){
            this.name = tmp;
        }
        
        this.uri = this.getAttributeValue(URI);
        
        if(uri == null || uri.length() == 0){
            throw new PolicyException("Namespace attribute is required under Header element ");
        }
        
    
Methods Summary
public booleanequals(java.lang.Object object)

        if(object instanceof Header){
            Header header = (Header)object;
            if(header.getLocalName() != null && header.getLocalName().equals(getLocalName())){
                if(header.getURI().equals(getURI())){
                    return true;
                }
            }
        }
        return false;
    
public java.lang.StringgetLocalName()

        return name;
    
public java.lang.StringgetURI()

        return uri;
    
public inthashCode()

        if(hashCode ==0){
            if(uri!=null){
                hashCode =uri.hashCode();
            }
            if(name !=null){
                hashCode =hashCode+name.hashCode();
            }
        }
        return hashCode;