author | aefimov |
Sun, 18 Jun 2017 23:07:25 +0100 | |
changeset 45678 | 65fdff10664d |
parent 30005 | b2f720a258c4 |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
45678
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
2 |
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package javax.xml.ws.handler; |
|
27 |
import java.util.Map; |
|
28 |
||
29 |
/** |
|
30005 | 30 |
* The interface {@code MessageContext} abstracts the message |
31 |
* context that is processed by a handler in the {@code handle} |
|
12009 | 32 |
* method. |
33 |
* |
|
30005 | 34 |
* <p>The {@code MessageContext} interface provides methods to |
35 |
* manage a property set. {@code MessageContext} properties |
|
12009 | 36 |
* enable handlers in a handler chain to share processing related |
37 |
* state. |
|
38 |
* |
|
25840 | 39 |
* @since 1.6, JAX-WS 2.0 |
12009 | 40 |
*/ |
41 |
public interface MessageContext extends Map<String, Object> { |
|
42 |
||
43 |
/** |
|
30005 | 44 |
* Standard property: message direction, {@code true} for |
45 |
* outbound messages, {@code false} for inbound. |
|
12009 | 46 |
* <p>Type: boolean |
47 |
*/ |
|
48 |
public static final String MESSAGE_OUTBOUND_PROPERTY = |
|
49 |
"javax.xml.ws.handler.message.outbound"; |
|
50 |
||
51 |
/** |
|
52 |
* Standard property: Map of attachments to a message for the inbound |
|
53 |
* message, key is the MIME Content-ID, value is a DataHandler. |
|
30005 | 54 |
* <p>Type: {@code java.util.Map<String, DataHandler>} |
12009 | 55 |
*/ |
56 |
public static final String INBOUND_MESSAGE_ATTACHMENTS = |
|
57 |
"javax.xml.ws.binding.attachments.inbound"; |
|
58 |
||
59 |
/** |
|
60 |
* Standard property: Map of attachments to a message for the outbound |
|
61 |
* message, key is the MIME Content-ID, value is a DataHandler. |
|
30005 | 62 |
* <p>Type: {@code java.util.Map<String, DataHandler>} |
12009 | 63 |
*/ |
64 |
public static final String OUTBOUND_MESSAGE_ATTACHMENTS = |
|
65 |
"javax.xml.ws.binding.attachments.outbound"; |
|
66 |
||
67 |
/** |
|
68 |
* Standard property: input source for WSDL document. |
|
69 |
* <p>Type: org.xml.sax.InputSource |
|
70 |
*/ |
|
71 |
public static final String WSDL_DESCRIPTION = |
|
72 |
"javax.xml.ws.wsdl.description"; |
|
73 |
||
74 |
/** |
|
75 |
* Standard property: name of WSDL service. |
|
76 |
* <p>Type: javax.xml.namespace.QName |
|
77 |
*/ |
|
78 |
public static final String WSDL_SERVICE = |
|
79 |
"javax.xml.ws.wsdl.service"; |
|
80 |
||
81 |
/** |
|
82 |
* Standard property: name of WSDL port. |
|
83 |
* <p>Type: javax.xml.namespace.QName |
|
84 |
*/ |
|
85 |
public static final String WSDL_PORT = |
|
86 |
"javax.xml.ws.wsdl.port"; |
|
87 |
||
88 |
/** |
|
89 |
* Standard property: name of wsdl interface (2.0) or port type (1.1). |
|
90 |
* <p>Type: javax.xml.namespace.QName |
|
91 |
*/ |
|
92 |
public static final String WSDL_INTERFACE = |
|
93 |
"javax.xml.ws.wsdl.interface"; |
|
94 |
||
95 |
/** |
|
96 |
* Standard property: name of WSDL operation. |
|
97 |
* <p>Type: javax.xml.namespace.QName |
|
98 |
*/ |
|
99 |
public static final String WSDL_OPERATION = |
|
100 |
"javax.xml.ws.wsdl.operation"; |
|
101 |
||
102 |
/** |
|
103 |
* Standard property: HTTP response status code. |
|
104 |
* <p>Type: java.lang.Integer |
|
105 |
*/ |
|
106 |
public static final String HTTP_RESPONSE_CODE = |
|
107 |
"javax.xml.ws.http.response.code"; |
|
108 |
||
109 |
/** |
|
110 |
* Standard property: HTTP request headers. |
|
30005 | 111 |
* <p>Type: {@code java.util.Map<java.lang.String, java.util.List<java.lang.String>>} |
12009 | 112 |
*/ |
113 |
public static final String HTTP_REQUEST_HEADERS = |
|
114 |
"javax.xml.ws.http.request.headers"; |
|
115 |
||
116 |
/** |
|
117 |
* Standard property: HTTP response headers. |
|
30005 | 118 |
* <p>Type: {@code java.util.Map<java.lang.String, java.util.List<java.lang.String>>} |
12009 | 119 |
*/ |
120 |
public static final String HTTP_RESPONSE_HEADERS = |
|
121 |
"javax.xml.ws.http.response.headers"; |
|
122 |
||
123 |
/** |
|
124 |
* Standard property: HTTP request method. |
|
125 |
* <p>Type: java.lang.String |
|
126 |
*/ |
|
127 |
public static final String HTTP_REQUEST_METHOD = |
|
128 |
"javax.xml.ws.http.request.method"; |
|
129 |
||
130 |
/** |
|
131 |
* Standard property: servlet request object. |
|
132 |
* <p>Type: javax.servlet.http.HttpServletRequest |
|
133 |
*/ |
|
134 |
public static final String SERVLET_REQUEST = |
|
135 |
"javax.xml.ws.servlet.request"; |
|
136 |
||
137 |
/** |
|
138 |
* Standard property: servlet response object. |
|
139 |
* <p>Type: javax.servlet.http.HttpServletResponse |
|
140 |
*/ |
|
141 |
public static final String SERVLET_RESPONSE = |
|
142 |
"javax.xml.ws.servlet.response"; |
|
143 |
||
144 |
/** |
|
145 |
* Standard property: servlet context object. |
|
146 |
* <p>Type: javax.servlet.ServletContext |
|
147 |
*/ |
|
148 |
public static final String SERVLET_CONTEXT = |
|
149 |
"javax.xml.ws.servlet.context"; |
|
150 |
||
151 |
/** |
|
152 |
* Standard property: Query string for request. |
|
153 |
* <p>Type: String |
|
154 |
**/ |
|
155 |
public static final String QUERY_STRING = |
|
156 |
"javax.xml.ws.http.request.querystring"; |
|
157 |
||
158 |
/** |
|
159 |
* Standard property: Request Path Info |
|
160 |
* <p>Type: String |
|
161 |
*/ |
|
162 |
public static final String PATH_INFO = |
|
163 |
"javax.xml.ws.http.request.pathinfo"; |
|
164 |
||
165 |
/** |
|
166 |
* Standard property: WS Addressing Reference Parameters. |
|
167 |
* The list MUST include all SOAP headers marked with the |
|
168 |
* wsa:IsReferenceParameter="true" attribute. |
|
30005 | 169 |
* <p>Type: {@code List<Element>} |
12009 | 170 |
* |
25840 | 171 |
* @since 1.6, JAX-WS 2.1 |
12009 | 172 |
*/ |
173 |
public static final String REFERENCE_PARAMETERS = |
|
174 |
"javax.xml.ws.reference.parameters"; |
|
175 |
||
176 |
/** |
|
30005 | 177 |
* Property scope. Properties scoped as {@code APPLICATION} are |
12009 | 178 |
* visible to handlers, |
179 |
* client applications and service endpoints; properties scoped as |
|
30005 | 180 |
* {@code HANDLER} |
12009 | 181 |
* are only normally visible to handlers. |
182 |
*/ |
|
45678
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
183 |
public enum Scope { |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
184 |
|
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
185 |
/** |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
186 |
* Application visibility. |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
187 |
*/ |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
188 |
APPLICATION, |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
189 |
|
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
190 |
/** |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
191 |
* Handler visibility. |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
192 |
*/ |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
30005
diff
changeset
|
193 |
HANDLER}; |
12009 | 194 |
|
195 |
/** |
|
196 |
* Sets the scope of a property. |
|
197 |
* |
|
198 |
* @param name Name of the property associated with the |
|
30005 | 199 |
* {@code MessageContext} |
12009 | 200 |
* @param scope Desired scope of the property |
201 |
* @throws java.lang.IllegalArgumentException if an illegal |
|
202 |
* property name is specified |
|
203 |
*/ |
|
204 |
public void setScope(String name, Scope scope); |
|
205 |
||
206 |
/** |
|
207 |
* Gets the scope of a property. |
|
208 |
* |
|
209 |
* @param name Name of the property |
|
210 |
* @return Scope of the property |
|
211 |
* @throws java.lang.IllegalArgumentException if a non-existant |
|
212 |
* property name is specified |
|
213 |
*/ |
|
214 |
public Scope getScope(String name); |
|
215 |
} |