Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java
38890 views
/*1* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.xml.soap;2627/**28* An object representing the contents in the SOAP header part of the29* SOAP envelope.30* The immediate children of a <code>SOAPHeader</code> object can31* be represented only as <code>SOAPHeaderElement</code> objects.32* <P>33* A <code>SOAPHeaderElement</code> object can have other34* <code>SOAPElement</code> objects as its children.35*/36public interface SOAPHeaderElement extends SOAPElement {3738/**39* Sets the actor associated with this <code>SOAPHeaderElement</code>40* object to the specified actor. The default value of an actor is:41* <code>SOAPConstants.URI_SOAP_ACTOR_NEXT</code>42* <P>43* If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is44* equivalent to {@link #setRole(String)}45*46* @param actorURI a <code>String</code> giving the URI of the actor47* to set48*49* @exception IllegalArgumentException if there is a problem in50* setting the actor.51*52* @see #getActor53*/54public void setActor(String actorURI);5556/**57* Sets the <code>Role</code> associated with this <code>SOAPHeaderElement</code>58* object to the specified <code>Role</code>.59*60* @param uri - the URI of the <code>Role</code>61*62* @throws SOAPException if there is an error in setting the role63*64* @exception UnsupportedOperationException if this message does not65* support the SOAP 1.2 concept of Fault Role.66*67* @since SAAJ 1.368*/69public void setRole(String uri) throws SOAPException;7071/**72* Returns the uri of the <i>actor</i> attribute of this73* <code>SOAPHeaderElement</code>.74*<P>75* If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is76* equivalent to {@link #getRole()}77* @return a <code>String</code> giving the URI of the actor78* @see #setActor79*/80public String getActor();8182/**83* Returns the value of the <i>Role</i> attribute of this84* <code>SOAPHeaderElement</code>.85*86* @return a <code>String</code> giving the URI of the <code>Role</code>87*88* @exception UnsupportedOperationException if this message does not89* support the SOAP 1.2 concept of Fault Role.90*91* @since SAAJ 1.392*/93public String getRole();9495/**96* Sets the mustUnderstand attribute for this <code>SOAPHeaderElement</code>97* object to be either true or false.98* <P>99* If the mustUnderstand attribute is on, the actor who receives the100* <code>SOAPHeaderElement</code> must process it correctly. This101* ensures, for example, that if the <code>SOAPHeaderElement</code>102* object modifies the message, that the message is being modified correctly.103*104* @param mustUnderstand <code>true</code> to set the mustUnderstand105* attribute to true; <code>false</code> to set it to false106*107* @exception IllegalArgumentException if there is a problem in108* setting the mustUnderstand attribute109* @see #getMustUnderstand110* @see #setRelay111*/112public void setMustUnderstand(boolean mustUnderstand);113114/**115* Returns the boolean value of the mustUnderstand attribute for this116* <code>SOAPHeaderElement</code>.117*118* @return <code>true</code> if the mustUnderstand attribute of this119* <code>SOAPHeaderElement</code> object is turned on; <code>false</code>120* otherwise121*/122public boolean getMustUnderstand();123124/**125* Sets the <i>relay</i> attribute for this <code>SOAPHeaderElement</code> to be126* either true or false.127* <P>128* The SOAP relay attribute is set to true to indicate that the SOAP header129* block must be relayed by any node that is targeted by the header block130* but not actually process it. This attribute is ignored on header blocks131* whose mustUnderstand attribute is set to true or that are targeted at132* the ultimate reciever (which is the default). The default value of this133* attribute is <code>false</code>.134*135* @param relay the new value of the <i>relay</i> attribute136*137* @exception SOAPException if there is a problem in setting the138* relay attribute.139* @exception UnsupportedOperationException if this message does not140* support the SOAP 1.2 concept of Relay attribute.141*142* @see #setMustUnderstand143* @see #getRelay144*145* @since SAAJ 1.3146*/147public void setRelay(boolean relay) throws SOAPException;148149/**150* Returns the boolean value of the <i>relay</i> attribute for this151* <code>SOAPHeaderElement</code>152*153* @return <code>true</code> if the relay attribute is turned on;154* <code>false</code> otherwise155*156* @exception UnsupportedOperationException if this message does not157* support the SOAP 1.2 concept of Relay attribute.158*159* @see #getMustUnderstand160* @see #setRelay161*162* @since SAAJ 1.3163*/164public boolean getRelay();165}166167168