01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package javax.xml.soap;
20:
21: /**
22: * <P>An object representing the contents in the SOAP header part of the SOAP envelope. The
23: * immediate children of a <CODE> SOAPHeader</CODE> object can be represented only as <CODE>
24: * SOAPHeaderElement</CODE> objects.</P>
25: * <p/>
26: * <P>A <CODE>SOAPHeaderElement</CODE> object can have other <CODE>SOAPElement</CODE> objects as its
27: * children.</P>
28: */
29: public interface SOAPHeaderElement extends SOAPElement {
30:
31: /**
32: * Sets the actor associated with this <CODE> SOAPHeaderElement</CODE> object to the specified
33: * actor. The default value of an actor is: <CODE> SOAPConstants.URI_SOAP_ACTOR_NEXT</CODE>
34: *
35: * @param actorURI a <CODE>String</CODE> giving the URI of the actor to set
36: * @throws IllegalArgumentException
37: * if there is a problem in setting the actor.
38: * @see #getActor() getActor()
39: */
40: public abstract void setActor(String actorURI);
41:
42: /**
43: * Returns the uri of the actor associated with this <CODE> SOAPHeaderElement</CODE> object.
44: *
45: * @return a <CODE>String</CODE> giving the URI of the actor
46: * @see #setActor(String) setActor(java.lang.String)
47: */
48: public abstract String getActor();
49:
50: /**
51: * Sets the mustUnderstand attribute for this <CODE> SOAPHeaderElement</CODE> object to be on or
52: * off.
53: * <p/>
54: * <P>If the mustUnderstand attribute is on, the actor who receives the
55: * <CODE>SOAPHeaderElement</CODE> must process it correctly. This ensures, for example, that if
56: * the <CODE> SOAPHeaderElement</CODE> object modifies the message, that the message is being
57: * modified correctly.</P>
58: *
59: * @param mustUnderstand <CODE>true</CODE> to set the mustUnderstand attribute on;
60: * <CODE>false</CODE> to turn if off
61: * @throws IllegalArgumentException
62: * if there is a problem in setting the actor.
63: * @see #getMustUnderstand() getMustUnderstand()
64: */
65: public abstract void setMustUnderstand(boolean mustUnderstand);
66:
67: /**
68: * Returns whether the mustUnderstand attribute for this <CODE>SOAPHeaderElement</CODE> object
69: * is turned on.
70: *
71: * @return <CODE>true</CODE> if the mustUnderstand attribute of this
72: * <CODE>SOAPHeaderElement</CODE> object is turned on; <CODE>false</CODE> otherwise
73: */
74: public abstract boolean getMustUnderstand();
75:
76: public abstract void setRole(String s) throws SOAPException;
77:
78: public abstract String getRole();
79:
80: public abstract void setRelay(boolean flag) throws SOAPException;
81:
82: public abstract boolean getRelay();
83: }
|