01: /*
02: * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.ws;
07:
08: /**
09: * <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<Source></code>,
13: * <code>Provider<SOAPMessage></code> and
14: * <code>Provider<DataSource></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: }
|