Thu, 31 Aug 2017 15:18:52 +0800
merge
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. Oracle designates this |
aoqi@0 | 8 | * particular file as subject to the "Classpath" exception as provided |
aoqi@0 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
aoqi@0 | 10 | * |
aoqi@0 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 15 | * accompanied this code). |
aoqi@0 | 16 | * |
aoqi@0 | 17 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 20 | * |
aoqi@0 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 22 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 23 | * questions. |
aoqi@0 | 24 | */ |
aoqi@0 | 25 | |
aoqi@0 | 26 | package javax.xml.soap; |
aoqi@0 | 27 | |
aoqi@0 | 28 | /** |
aoqi@0 | 29 | * An object representing the contents in the SOAP header part of the |
aoqi@0 | 30 | * SOAP envelope. |
aoqi@0 | 31 | * The immediate children of a <code>SOAPHeader</code> object can |
aoqi@0 | 32 | * be represented only as <code>SOAPHeaderElement</code> objects. |
aoqi@0 | 33 | * <P> |
aoqi@0 | 34 | * A <code>SOAPHeaderElement</code> object can have other |
aoqi@0 | 35 | * <code>SOAPElement</code> objects as its children. |
aoqi@0 | 36 | */ |
aoqi@0 | 37 | public interface SOAPHeaderElement extends SOAPElement { |
aoqi@0 | 38 | |
aoqi@0 | 39 | /** |
aoqi@0 | 40 | * Sets the actor associated with this <code>SOAPHeaderElement</code> |
aoqi@0 | 41 | * object to the specified actor. The default value of an actor is: |
aoqi@0 | 42 | * <code>SOAPConstants.URI_SOAP_ACTOR_NEXT</code> |
aoqi@0 | 43 | * <P> |
aoqi@0 | 44 | * If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is |
aoqi@0 | 45 | * equivalent to {@link #setRole(String)} |
aoqi@0 | 46 | * |
aoqi@0 | 47 | * @param actorURI a <code>String</code> giving the URI of the actor |
aoqi@0 | 48 | * to set |
aoqi@0 | 49 | * |
aoqi@0 | 50 | * @exception IllegalArgumentException if there is a problem in |
aoqi@0 | 51 | * setting the actor. |
aoqi@0 | 52 | * |
aoqi@0 | 53 | * @see #getActor |
aoqi@0 | 54 | */ |
aoqi@0 | 55 | public void setActor(String actorURI); |
aoqi@0 | 56 | |
aoqi@0 | 57 | /** |
aoqi@0 | 58 | * Sets the <code>Role</code> associated with this <code>SOAPHeaderElement</code> |
aoqi@0 | 59 | * object to the specified <code>Role</code>. |
aoqi@0 | 60 | * |
aoqi@0 | 61 | * @param uri - the URI of the <code>Role</code> |
aoqi@0 | 62 | * |
aoqi@0 | 63 | * @throws SOAPException if there is an error in setting the role |
aoqi@0 | 64 | * |
aoqi@0 | 65 | * @exception UnsupportedOperationException if this message does not |
aoqi@0 | 66 | * support the SOAP 1.2 concept of Fault Role. |
aoqi@0 | 67 | * |
aoqi@0 | 68 | * @since SAAJ 1.3 |
aoqi@0 | 69 | */ |
aoqi@0 | 70 | public void setRole(String uri) throws SOAPException; |
aoqi@0 | 71 | |
aoqi@0 | 72 | /** |
aoqi@0 | 73 | * Returns the uri of the <i>actor</i> attribute of this |
aoqi@0 | 74 | * <code>SOAPHeaderElement</code>. |
aoqi@0 | 75 | *<P> |
aoqi@0 | 76 | * If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is |
aoqi@0 | 77 | * equivalent to {@link #getRole()} |
aoqi@0 | 78 | * @return a <code>String</code> giving the URI of the actor |
aoqi@0 | 79 | * @see #setActor |
aoqi@0 | 80 | */ |
aoqi@0 | 81 | public String getActor(); |
aoqi@0 | 82 | |
aoqi@0 | 83 | /** |
aoqi@0 | 84 | * Returns the value of the <i>Role</i> attribute of this |
aoqi@0 | 85 | * <code>SOAPHeaderElement</code>. |
aoqi@0 | 86 | * |
aoqi@0 | 87 | * @return a <code>String</code> giving the URI of the <code>Role</code> |
aoqi@0 | 88 | * |
aoqi@0 | 89 | * @exception UnsupportedOperationException if this message does not |
aoqi@0 | 90 | * support the SOAP 1.2 concept of Fault Role. |
aoqi@0 | 91 | * |
aoqi@0 | 92 | * @since SAAJ 1.3 |
aoqi@0 | 93 | */ |
aoqi@0 | 94 | public String getRole(); |
aoqi@0 | 95 | |
aoqi@0 | 96 | /** |
aoqi@0 | 97 | * Sets the mustUnderstand attribute for this <code>SOAPHeaderElement</code> |
aoqi@0 | 98 | * object to be either true or false. |
aoqi@0 | 99 | * <P> |
aoqi@0 | 100 | * If the mustUnderstand attribute is on, the actor who receives the |
aoqi@0 | 101 | * <code>SOAPHeaderElement</code> must process it correctly. This |
aoqi@0 | 102 | * ensures, for example, that if the <code>SOAPHeaderElement</code> |
aoqi@0 | 103 | * object modifies the message, that the message is being modified correctly. |
aoqi@0 | 104 | * |
aoqi@0 | 105 | * @param mustUnderstand <code>true</code> to set the mustUnderstand |
aoqi@0 | 106 | * attribute to true; <code>false</code> to set it to false |
aoqi@0 | 107 | * |
aoqi@0 | 108 | * @exception IllegalArgumentException if there is a problem in |
aoqi@0 | 109 | * setting the mustUnderstand attribute |
aoqi@0 | 110 | * @see #getMustUnderstand |
aoqi@0 | 111 | * @see #setRelay |
aoqi@0 | 112 | */ |
aoqi@0 | 113 | public void setMustUnderstand(boolean mustUnderstand); |
aoqi@0 | 114 | |
aoqi@0 | 115 | /** |
aoqi@0 | 116 | * Returns the boolean value of the mustUnderstand attribute for this |
aoqi@0 | 117 | * <code>SOAPHeaderElement</code>. |
aoqi@0 | 118 | * |
aoqi@0 | 119 | * @return <code>true</code> if the mustUnderstand attribute of this |
aoqi@0 | 120 | * <code>SOAPHeaderElement</code> object is turned on; <code>false</code> |
aoqi@0 | 121 | * otherwise |
aoqi@0 | 122 | */ |
aoqi@0 | 123 | public boolean getMustUnderstand(); |
aoqi@0 | 124 | |
aoqi@0 | 125 | /** |
aoqi@0 | 126 | * Sets the <i>relay</i> attribute for this <code>SOAPHeaderElement</code> to be |
aoqi@0 | 127 | * either true or false. |
aoqi@0 | 128 | * <P> |
aoqi@0 | 129 | * The SOAP relay attribute is set to true to indicate that the SOAP header |
aoqi@0 | 130 | * block must be relayed by any node that is targeted by the header block |
aoqi@0 | 131 | * but not actually process it. This attribute is ignored on header blocks |
aoqi@0 | 132 | * whose mustUnderstand attribute is set to true or that are targeted at |
aoqi@0 | 133 | * the ultimate reciever (which is the default). The default value of this |
aoqi@0 | 134 | * attribute is <code>false</code>. |
aoqi@0 | 135 | * |
aoqi@0 | 136 | * @param relay the new value of the <i>relay</i> attribute |
aoqi@0 | 137 | * |
aoqi@0 | 138 | * @exception SOAPException if there is a problem in setting the |
aoqi@0 | 139 | * relay attribute. |
aoqi@0 | 140 | * @exception UnsupportedOperationException if this message does not |
aoqi@0 | 141 | * support the SOAP 1.2 concept of Relay attribute. |
aoqi@0 | 142 | * |
aoqi@0 | 143 | * @see #setMustUnderstand |
aoqi@0 | 144 | * @see #getRelay |
aoqi@0 | 145 | * |
aoqi@0 | 146 | * @since SAAJ 1.3 |
aoqi@0 | 147 | */ |
aoqi@0 | 148 | public void setRelay(boolean relay) throws SOAPException; |
aoqi@0 | 149 | |
aoqi@0 | 150 | /** |
aoqi@0 | 151 | * Returns the boolean value of the <i>relay</i> attribute for this |
aoqi@0 | 152 | * <code>SOAPHeaderElement</code> |
aoqi@0 | 153 | * |
aoqi@0 | 154 | * @return <code>true</code> if the relay attribute is turned on; |
aoqi@0 | 155 | * <code>false</code> otherwise |
aoqi@0 | 156 | * |
aoqi@0 | 157 | * @exception UnsupportedOperationException if this message does not |
aoqi@0 | 158 | * support the SOAP 1.2 concept of Relay attribute. |
aoqi@0 | 159 | * |
aoqi@0 | 160 | * @see #getMustUnderstand |
aoqi@0 | 161 | * @see #setRelay |
aoqi@0 | 162 | * |
aoqi@0 | 163 | * @since SAAJ 1.3 |
aoqi@0 | 164 | */ |
aoqi@0 | 165 | public boolean getRelay(); |
aoqi@0 | 166 | } |