KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > soap > SOAPHeaderBlock


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis2.soap;
17
18 import org.apache.axis2.om.OMElement;
19 import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
20
21 /**
22  * <P>An object representing the contents in the SOAP header part of the SOAP
23  * envelope. The immediate children of a <CODE> SOAPHeader</CODE> object can be
24  * represented only as <CODE> SOAPHeaderBlock</CODE> objects.</P> <P>B
25  * <CODE>SOAPHeaderBlock</CODE> object can have other <CODE>OMElement</CODE>
26  * objects as its children.</P>
27  */

28 public interface SOAPHeaderBlock extends OMElement {
29     /**
30      * Sets the actor associated with this <CODE> SOAPHeaderBlock</CODE> object
31      * to the specified actor. The default value of an actor is: <CODE>
32      * OMConstants.URI_SOAP_ACTOR_NEXT</CODE>
33      *
34      * @param roleURI a <CODE>String</CODE> giving the URI of the actor to set
35      * @throws java.lang.IllegalArgumentException
36      * if there is a problem in setting the actor.
37      * @see #getRole() getRole()
38      */

39     public abstract void setRole(String JavaDoc roleURI);
40
41     /**
42      * Returns the uri of the actor associated with this <CODE>
43      * SOAPHeaderBlock</CODE> object.
44      *
45      * @return a <CODE>String</CODE> giving the URI of the actor
46      * @see #setRole(java.lang.String) setRole(java.lang.String)
47      */

48     public abstract String JavaDoc getRole();
49
50     /**
51      * Sets the mustUnderstand attribute for this <CODE> SOAPHeaderBlock</CODE>
52      * object to be on or off. <P>If the mustUnderstand attribute is on, the
53      * actor who receives the <CODE>SOAPHeaderBlock</CODE> must process it
54      * correctly. This ensures, for example, that if the <CODE>
55      * SOAPHeaderBlock</CODE> object modifies the message, that the message is
56      * being modified correctly.</P>
57      *
58      * @param mustUnderstand <CODE>true</CODE> to set the mustUnderstand
59      * attribute on; <CODE>false</CODE> to turn if off
60      * @throws java.lang.IllegalArgumentException
61      * if there is a problem in setting the actor.
62      * @see #getMustUnderstand() getMustUnderstand()
63      */

64     public abstract void setMustUnderstand(boolean mustUnderstand);
65     public abstract void setMustUnderstand(String JavaDoc mustUnderstand) throws SOAPProcessingException;
66
67     /**
68      * Returns whether the mustUnderstand attribute for this
69      * <CODE>SOAPHeaderBlock</CODE> object is turned on.
70      *
71      * @return <CODE>true</CODE> if the mustUnderstand attribute of this
72      * <CODE>SOAPHeaderBlock</CODE> object is turned on;
73      * <CODE>false</CODE> otherwise
74      */

75     public abstract boolean getMustUnderstand() throws SOAPProcessingException;
76
77
78     public abstract boolean isProcessed();
79
80      /**
81      * We need to know whether all the mustUnderstand headers have been
82      * processed by the node. This will done by a specific validation handler at
83      * the end of the execution chain. For this all the handlers who process a
84      * particular header block must explicitly say that he processesd the header
85      * by calling setProcessed()
86      *
87      */

88     public abstract void setProcessed();
89
90 }
91
Popular Tags