< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/Stubs.java

Print this page




  58 
  59 /**
  60  * Factory methods of various stubs.
  61  *
  62  * <p>
  63  * This class provides various methods to create "stub"s,
  64  * which are the component that turns a method invocation
  65  * into a {@link Message} and back into a return value.
  66  *
  67  * <p>
  68  * This class is meant to serve as the API from JAX-WS to
  69  * Tango, so that they don't have hard-code dependency on
  70  * our implementation classes.
  71  *
  72  * <a name="param"></a>
  73  * <h2>Common Parameters and Their Meanings</h2>
  74  *
  75  * <h3>Pipe next</h3>
  76  * <p>
  77  * Stubs turn a method invocation into a {@link Pipe#process(com.sun.xml.internal.ws.api.message.Packet)} invocation,
  78  * and this pipe passed in as the <tt>next</tt> parameter will receive a {@link Message}
  79  * from newly created stub. All the methods taking Tube <<next>> parameter are deprecated. JAX-WS Runtime takes care of
  80  * creating the tubeline when the <tt>next</tt> parameter is not passed. This gives flexibility for the JAX-WS Runtime
  81  * to pass extra information during the tube line creation via {@link ClientTubeAssemblerContext}.
  82  *
  83  * <h3>WSPortInfo portInfo</h3>
  84  * <p> Gives information about the port for which the "stub" being created. Such information includes Port QName,
  85  * target endpoint address, and bindingId etc.
  86  *
  87  * <h3>BindingImpl binding</h3>
  88  * <p>
  89  * Stubs implement {@link BindingProvider}, and its {@link BindingProvider#getBinding()}
  90  * will return this <tt>binding</tt> object. Stubs often also use this information
  91  * to decide which SOAP version a {@link Message} should be created in.
  92  *
  93  * <h3>{@link WSService} service</h3>
  94  * <p>
  95  * This object represents a {@link Service} that owns the newly created stub.
  96  * For example, asynchronous method invocation will use {@link Service#getExecutor()}.
  97  *
  98  * <h3>{@link WSEndpointReference} epr</h3>
  99  * <p>
 100  * If you want the created {@link Dispatch} to talk to the given EPR, specify the parameter.
 101  * Otherwise leave it <tt>null</tt>. Note that the addressing needs to be enabled separately
 102  * for this to take effect.
 103  *
 104  * @author Kohsuke Kawaguchi
 105  * @author Kathy Walsh
 106  */
 107 public abstract class Stubs {
 108     private Stubs() {}   // no instanciation please
 109 
 110     /**
 111      * Creates a new {@link Dispatch} stub for {@link SOAPMessage}.
 112      *
 113      * This is short-cut of calling
 114      * <pre>
 115      * createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
 116      * </pre>
 117      */
 118     @Deprecated
 119     public static Dispatch<SOAPMessage> createSAAJDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
 120         DispatchImpl.checkValidSOAPMessageDispatch(binding, mode);
 121         return new com.sun.xml.internal.ws.client.dispatch.SOAPMessageDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);




  58 
  59 /**
  60  * Factory methods of various stubs.
  61  *
  62  * <p>
  63  * This class provides various methods to create "stub"s,
  64  * which are the component that turns a method invocation
  65  * into a {@link Message} and back into a return value.
  66  *
  67  * <p>
  68  * This class is meant to serve as the API from JAX-WS to
  69  * Tango, so that they don't have hard-code dependency on
  70  * our implementation classes.
  71  *
  72  * <a name="param"></a>
  73  * <h2>Common Parameters and Their Meanings</h2>
  74  *
  75  * <h3>Pipe next</h3>
  76  * <p>
  77  * Stubs turn a method invocation into a {@link Pipe#process(com.sun.xml.internal.ws.api.message.Packet)} invocation,
  78  * and this pipe passed in as the {@code next} parameter will receive a {@link Message}
  79  * from newly created stub. All the methods taking Tube <<next>> parameter are deprecated. JAX-WS Runtime takes care of
  80  * creating the tubeline when the {@code next} parameter is not passed. This gives flexibility for the JAX-WS Runtime
  81  * to pass extra information during the tube line creation via {@link ClientTubeAssemblerContext}.
  82  *
  83  * <h3>WSPortInfo portInfo</h3>
  84  * <p> Gives information about the port for which the "stub" being created. Such information includes Port QName,
  85  * target endpoint address, and bindingId etc.
  86  *
  87  * <h3>BindingImpl binding</h3>
  88  * <p>
  89  * Stubs implement {@link BindingProvider}, and its {@link BindingProvider#getBinding()}
  90  * will return this {@code binding} object. Stubs often also use this information
  91  * to decide which SOAP version a {@link Message} should be created in.
  92  *
  93  * <h3>{@link WSService} service</h3>
  94  * <p>
  95  * This object represents a {@link Service} that owns the newly created stub.
  96  * For example, asynchronous method invocation will use {@link Service#getExecutor()}.
  97  *
  98  * <h3>{@link WSEndpointReference} epr</h3>
  99  * <p>
 100  * If you want the created {@link Dispatch} to talk to the given EPR, specify the parameter.
 101  * Otherwise leave it {@code null}. Note that the addressing needs to be enabled separately
 102  * for this to take effect.
 103  *
 104  * @author Kohsuke Kawaguchi
 105  * @author Kathy Walsh
 106  */
 107 public abstract class Stubs {
 108     private Stubs() {}   // no instanciation please
 109 
 110     /**
 111      * Creates a new {@link Dispatch} stub for {@link SOAPMessage}.
 112      *
 113      * This is short-cut of calling
 114      * <pre>
 115      * createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
 116      * </pre>
 117      */
 118     @Deprecated
 119     public static Dispatch<SOAPMessage> createSAAJDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
 120         DispatchImpl.checkValidSOAPMessageDispatch(binding, mode);
 121         return new com.sun.xml.internal.ws.client.dispatch.SOAPMessageDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);


< prev index next >