KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > ws > BindingProvider


1 /*
2  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.ws;
7
8 import java.util.Map JavaDoc;
9 import javax.xml.ws.wsaddressing.W3CEndpointReference;
10 import org.w3c.dom.Element JavaDoc;
11
12 /**
13  * The <code>BindingProvider</code> interface provides access to the
14  * protocol binding and associated context objects for request and
15  * response message processing.
16  *
17  * @since JAX-WS 2.0
18  *
19  * @see javax.xml.ws.Binding
20  **/

21 public interface BindingProvider {
22     /**
23      * Standard property: User name for authentication.
24      * <p>Type: <code>java.lang.String</code>
25      **/

26     public static final String JavaDoc USERNAME_PROPERTY =
27             "javax.xml.ws.security.auth.username";
28     
29     /**
30      * Standard property: Password for authentication.
31      * <p>Type: <code>java.lang.String</code>
32      **/

33     public static final String JavaDoc PASSWORD_PROPERTY =
34             "javax.xml.ws.security.auth.password";
35     
36     /**
37      * Standard property: Target service endpoint address. The
38      * URI scheme for the endpoint address specification MUST
39      * correspond to the protocol/transport binding for the
40      * binding in use.
41      * <p>Type: <code>java.lang.String</code>
42      **/

43     public static final String JavaDoc ENDPOINT_ADDRESS_PROPERTY =
44             "javax.xml.ws.service.endpoint.address";
45     
46     /**
47      * Standard property: This boolean property is used by a service
48      * client to indicate whether or not it wants to participate in
49      * a session with a service endpoint. If this property is set to
50      * <code>true</code>, the service client indicates that it wants the session
51      * to be maintained. If set to <code>false</code>, the session is not maintained.
52      * The default value for this property is <code>false</code>.
53      * <p>Type: <code>java.lang.Boolean</code>
54      **/

55     public static final String JavaDoc SESSION_MAINTAIN_PROPERTY =
56             "javax.xml.ws.session.maintain";
57     
58     /**
59      * Standard property for SOAPAction. This boolean property
60      * indicates whether or not the value of the
61      * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
62      * is used for the value of the SOAPAction. The
63      * default value of this property is <code>false</code> indicating
64      * that the
65      * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
66      * is not used for the value of the SOAPAction, however,
67      * if WS-Addressing is enabled, the default value is
68      * <code>true</code>.
69      *
70      * <p>Type: <code>java.lang.Boolean</code>
71      **/

72     public static final String JavaDoc SOAPACTION_USE_PROPERTY =
73             "javax.xml.ws.soap.http.soapaction.use";
74     
75     /**
76      * Standard property for SOAPAction. Indicates the SOAPAction
77      * URI if the <code>javax.xml.ws.soap.http.soapaction.use</code>
78      * property is set to <code>true</code>. If WS-Addressing
79      * is enabled, this value will also be used for the value of the
80      * WS-Addressing Action header. If this property is not set,
81      * the default SOAPAction and WS-Addressing Action will be sent.
82      *
83      * <p>Type: <code>java.lang.String</code>
84      **/

85     public static final String JavaDoc SOAPACTION_URI_PROPERTY =
86             "javax.xml.ws.soap.http.soapaction.uri";
87     
88     /**
89      * Get the context that is used to initialize the message context
90      * for request messages.
91      *
92      * Modifications to the request context do not affect the message context of
93      * either synchronous or asynchronous operations that have already been
94      * started.
95      *
96      * @return The context that is used in processing request messages.
97      **/

98     Map JavaDoc<String JavaDoc, Object JavaDoc> getRequestContext();
99     
100     /**
101      * Get the context that resulted from processing a response message.
102      *
103      * The returned context is for the most recently completed synchronous
104      * operation. Subsequent synchronous operation invocations overwrite the
105      * response context. Asynchronous operations return their response context
106      * via the Response interface.
107      *
108      * @return The context that resulted from processing the latest
109      * response messages.
110      **/

111     Map JavaDoc<String JavaDoc, Object JavaDoc> getResponseContext();
112     
113     /**
114      * Get the Binding for this binding provider.
115      *
116      * @return The Binding for this binding provider.
117      **/

118     Binding getBinding();
119     
120    
121     
122     /**
123      * Returns the <code>EndpointReference</code> associated with
124      * this <code>BindingProvider</code> instance.
125      * <p>
126      * If the Binding for this <code>bindingProvider</code> is
127      * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
128      * <code>W3CEndpointReference</code> MUST be returned.
129      *
130      * @return EndpointReference of the target endpoint associated with this
131      * <code>BindingProvider</code> instance.
132      *
133      * @throws java.lang.UnsupportedOperationException If this
134      * <code>BindingProvider</code> uses the XML/HTTP binding.
135      *
136      * @see W3CEndpointReference
137      *
138      * @since JAX-WS 2.1
139      */

140     public EndpointReference getEndpointReference();
141     
142     
143     /**
144      * Returns the <code>EndpointReference</code> associated with
145      * this <code>BindingProvider</code> instance. The instance
146      * returned will be of type <code>clazz</code>.
147      *
148      * @param clazz Specifies the type of <code>EndpointReference</code>
149      * that MUST be returned.
150
151      * @return EndpointReference of the target endpoint associated with this
152      * <code>BindingProvider</code> instance. MUST be of type
153      * <code>clazz</code>.
154
155      * @throws WebServiceException If the Class <code>clazz</code>
156      * is not supported by this implementation.
157      * @throws java.lang.UnsupportedOperationException If this
158      * <code>BindingProvider</code> uses the XML/HTTP binding.
159      *
160      * @since JAX-WS 2.1
161      */

162     public <T extends EndpointReference> T getEndpointReference(Class JavaDoc<T> clazz);
163 }
164
Popular Tags