Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java
38890 views
/*1* Copyright (c) 2005, 2010, 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.ws;2627import java.util.Map;28import javax.xml.ws.wsaddressing.W3CEndpointReference;2930/**31* The <code>BindingProvider</code> interface provides access to the32* protocol binding and associated context objects for request and33* response message processing.34*35* @since JAX-WS 2.036*37* @see javax.xml.ws.Binding38**/39public interface BindingProvider {40/**41* Standard property: User name for authentication.42* <p>Type: <code>java.lang.String</code>43**/44public static final String USERNAME_PROPERTY =45"javax.xml.ws.security.auth.username";4647/**48* Standard property: Password for authentication.49* <p>Type: <code>java.lang.String</code>50**/51public static final String PASSWORD_PROPERTY =52"javax.xml.ws.security.auth.password";5354/**55* Standard property: Target service endpoint address. The56* URI scheme for the endpoint address specification MUST57* correspond to the protocol/transport binding for the58* binding in use.59* <p>Type: <code>java.lang.String</code>60**/61public static final String ENDPOINT_ADDRESS_PROPERTY =62"javax.xml.ws.service.endpoint.address";6364/**65* Standard property: This boolean property is used by a service66* client to indicate whether or not it wants to participate in67* a session with a service endpoint. If this property is set to68* <code>true</code>, the service client indicates that it wants the session69* to be maintained. If set to <code>false</code>, the session is not maintained.70* The default value for this property is <code>false</code>.71* <p>Type: <code>java.lang.Boolean</code>72**/73public static final String SESSION_MAINTAIN_PROPERTY =74"javax.xml.ws.session.maintain";7576/**77* Standard property for SOAPAction. This boolean property78* indicates whether or not the value of the79* <code>javax.xml.ws.soap.http.soapaction.uri</code> property80* is used for the value of the SOAPAction. The81* default value of this property is <code>false</code> indicating82* that the83* <code>javax.xml.ws.soap.http.soapaction.uri</code> property84* is not used for the value of the SOAPAction, however,85* if WS-Addressing is enabled, the default value is86* <code>true</code>.87*88* <p>Type: <code>java.lang.Boolean</code>89**/90public static final String SOAPACTION_USE_PROPERTY =91"javax.xml.ws.soap.http.soapaction.use";9293/**94* Standard property for SOAPAction. Indicates the SOAPAction95* URI if the <code>javax.xml.ws.soap.http.soapaction.use</code>96* property is set to <code>true</code>. If WS-Addressing97* is enabled, this value will also be used for the value of the98* WS-Addressing Action header. If this property is not set,99* the default SOAPAction and WS-Addressing Action will be sent.100*101* <p>Type: <code>java.lang.String</code>102**/103public static final String SOAPACTION_URI_PROPERTY =104"javax.xml.ws.soap.http.soapaction.uri";105106/**107* Get the context that is used to initialize the message context108* for request messages.109*110* Modifications to the request context do not affect the message context of111* either synchronous or asynchronous operations that have already been112* started.113*114* @return The context that is used in processing request messages.115**/116Map<String, Object> getRequestContext();117118/**119* Get the context that resulted from processing a response message.120*121* The returned context is for the most recently completed synchronous122* operation. Subsequent synchronous operation invocations overwrite the123* response context. Asynchronous operations return their response context124* via the Response interface.125*126* @return The context that resulted from processing the latest127* response messages.128**/129Map<String, Object> getResponseContext();130131/**132* Get the Binding for this binding provider.133*134* @return The Binding for this binding provider.135**/136Binding getBinding();137138139140/**141* Returns the <code>EndpointReference</code> associated with142* this <code>BindingProvider</code> instance.143* <p>144* If the Binding for this <code>bindingProvider</code> is145* either SOAP1.1/HTTP or SOAP1.2/HTTP, then a146* <code>W3CEndpointReference</code> MUST be returned.147*148* @return EndpointReference of the target endpoint associated with this149* <code>BindingProvider</code> instance.150*151* @throws java.lang.UnsupportedOperationException If this152* <code>BindingProvider</code> uses the XML/HTTP binding.153*154* @see W3CEndpointReference155*156* @since JAX-WS 2.1157*/158public EndpointReference getEndpointReference();159160161/**162* Returns the <code>EndpointReference</code> associated with163* this <code>BindingProvider</code> instance. The instance164* returned will be of type <code>clazz</code>.165*166* @param clazz Specifies the type of <code>EndpointReference</code>167* that MUST be returned.168169* @return EndpointReference of the target endpoint associated with this170* <code>BindingProvider</code> instance. MUST be of type171* <code>clazz</code>.172173* @throws WebServiceException If the Class <code>clazz</code>174* is not supported by this implementation.175* @throws java.lang.UnsupportedOperationException If this176* <code>BindingProvider</code> uses the XML/HTTP binding.177*178* @since JAX-WS 2.1179*/180public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);181}182183184