KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
9  * <p>Service endpoints may implement the <code>Provider</code>
10  * interface as a dynamic alternative to an SEI.
11  *
12  * <p>Implementations are required to support <code>Provider&lt;Source&gt;</code>,
13  * <code>Provider&lt;SOAPMessage&gt;</code> and
14  * <code>Provider&lt;DataSource&gt;</code>, depending on the binding
15  * in use and the service mode.
16  *
17  * <p>The <code>ServiceMode</code> annotation can be used to control whether
18  * the <code>Provider</code> instance will receive entire protocol messages
19  * or just message payloads.
20  *
21  * @since JAX-WS 2.0
22  *
23  * @see javax.xml.transform.Source
24  * @see javax.xml.soap.SOAPMessage
25  * @see javax.xml.ws.ServiceMode
26 **/

27 public interface Provider<T> {
28
29   /** Invokes an operation occording to the contents of the request
30    * message.
31    *
32    * @param request The request message or message payload.
33    * @return The response message or message payload. May be <code>null</code> if
34               there is no response.
35    * @throws WebServiceException If there is an error processing request.
36    * The cause of the <code>WebServiceException</code> may be set to a subclass
37    * of <code>ProtocolException</code> to control the protocol level
38    * representation of the exception.
39    * @see javax.xml.ws.handler.MessageContext
40    * @see javax.xml.ws.ProtocolException
41   **/

42   public T invoke(T request);
43 }
44
Popular Tags