Class DispatchImpl<T>

java.lang.Object
com.sun.xml.ws.client.Stub
com.sun.xml.ws.client.dispatch.DispatchImpl<T>
All Implemented Interfaces:
Component, ComponentRegistry, ResponseContextReceiver, WSBindingProvider, jakarta.xml.ws.BindingProvider, jakarta.xml.ws.Dispatch<T>, Closeable, AutoCloseable
Direct Known Subclasses:
DataSourceDispatch, JAXBDispatch, MessageDispatch, PacketDispatch, SOAPMessageDispatch

public abstract class DispatchImpl<T> extends Stub implements jakarta.xml.ws.Dispatch<T>
The DispatchImpl abstract class provides support for the dynamic invocation of a service endpoint operation using XML constructs, JAXB objects or SOAPMessage. The jakarta.xml.ws.Service interface acts as a factory for the creation of DispatchImpl instances.
Version:
1.0
Author:
WS Development Team
  • Constructor Details

    • DispatchImpl

      @Deprecated protected DispatchImpl(QName port, jakarta.xml.ws.Service.Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr)
      Deprecated.
      Parameters:
      port - dispatch instance is associated with this wsdl port qName
      mode - Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
      owner - Service that created the Dispatch
      pipe - Master pipe for the pipeline
      binding - Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
    • DispatchImpl

      protected DispatchImpl(WSPortInfo portInfo, jakarta.xml.ws.Service.Mode mode, BindingImpl binding, @Nullable WSEndpointReference epr)
      Parameters:
      portInfo - dispatch instance is associated with this portInfo
      mode - Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
      binding - Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
    • DispatchImpl

      protected DispatchImpl(WSPortInfo portInfo, jakarta.xml.ws.Service.Mode mode, BindingImpl binding, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg)
      Parameters:
      portInfo - dispatch instance is associated with this portInfo
      mode - Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
      binding - Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
      allowFaultResponseMsg - A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
    • DispatchImpl

      protected DispatchImpl(WSPortInfo portInfo, jakarta.xml.ws.Service.Mode mode, BindingImpl binding, Tube pipe, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg)
      Parameters:
      portInfo - dispatch instance is associated with this portInfo
      mode - Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
      binding - Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
      pipe - Master pipe for the pipeline
      allowFaultResponseMsg - A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
    • DispatchImpl

      protected DispatchImpl(WSPortInfo portInfo, jakarta.xml.ws.Service.Mode mode, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg)
      Parameters:
      portInfo - dispatch instance is associated with this wsdl port qName
      mode - Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
      pipe - Master pipe for the pipeline
      binding - Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
      allowFaultResponseMsg - A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
  • Method Details

    • invokeAsync

      public final jakarta.xml.ws.Response<T> invokeAsync(T param)
      Specified by:
      invokeAsync in interface jakarta.xml.ws.Dispatch<T>
    • invokeAsync

      public final Future<?> invokeAsync(T param, jakarta.xml.ws.AsyncHandler<T> asyncHandler)
      Specified by:
      invokeAsync in interface jakarta.xml.ws.Dispatch<T>
    • doInvoke

      public final T doInvoke(T in, RequestContext rc, ResponseContextReceiver receiver)
      Synchronously invokes a service. See Stub.process(Packet, RequestContext, ResponseContextReceiver) on why it takes a RequestContext and ResponseContextReceiver as a parameter.
    • invoke

      public final T invoke(T in)
      Specified by:
      invoke in interface jakarta.xml.ws.Dispatch<T>
    • invokeOneWay

      public final void invokeOneWay(T in)
      Specified by:
      invokeOneWay in interface jakarta.xml.ws.Dispatch<T>
    • checkValidSOAPMessageDispatch

      public static void checkValidSOAPMessageDispatch(WSBinding binding, jakarta.xml.ws.Service.Mode mode)
    • checkValidDataSourceDispatch

      public static void checkValidDataSourceDispatch(WSBinding binding, jakarta.xml.ws.Service.Mode mode)
    • getPortName

      @NotNull public final QName getPortName()
      Description copied from class: Stub
      Gets the port name that this stub is configured to talk to.

      When Stub.wsdlPort is non-null, the port name is always the same as WSDLPort.getName(), but this method returns a port name even if no WSDL is available for this stub.

      Specified by:
      getPortName in class Stub
    • resolveURI

      @NotNull protected String resolveURI(@NotNull URI endpointURI, @Nullable String pathInfo, @Nullable String queryString)
    • setOutboundAttachments

      protected AttachmentSet setOutboundAttachments()
    • setOutboundHeaders

      public void setOutboundHeaders(Object... headers)
      Description copied from interface: WSBindingProvider
      Sets the out-bound headers to be added to messages sent from this BindingProvider.

      Each object must be a JAXB-bound object that is understood by the JAXBContext object known by this WSBindingProvider (that is, if this is a Dispatch with JAXB, then JAXBContext given to Service.createDispatch(QName,JAXBContext,Mode) and if this is a typed proxy, then JAXBContext implicitly created by the JAX-WS RI.)

      Specified by:
      setOutboundHeaders in interface WSBindingProvider
      Parameters:
      headers - Can be null or empty.
    • createSourceDispatch

      @Deprecated public static jakarta.xml.ws.Dispatch<Source> createSourceDispatch(QName port, jakarta.xml.ws.Service.Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr)
      Deprecated.
    • createSourceDispatch

      public static jakarta.xml.ws.Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, jakarta.xml.ws.Service.Mode mode, BindingImpl binding, WSEndpointReference epr)