Class AbstractHTTPDestination

All Implemented Interfaces:
Configurable, Assertor, Destination, DestinationWithEndpoint, MultiplexDestination, Observable
Direct Known Subclasses:
JAXWSHttpSpiDestination, NettyHttpDestination, ServletDestination

public abstract class AbstractHTTPDestination extends AbstractMultiplexDestination implements Configurable, Assertor
Common base for HTTP Destination implementations.
  • Field Details

  • Constructor Details

    • AbstractHTTPDestination

      public AbstractHTTPDestination(Bus b, DestinationRegistry registry, EndpointInfo ei, String path, boolean dp) throws IOException
      Constructor
      Parameters:
      b - the associated Bus
      registry - the destination registry
      ei - the endpoint info of the destination
      path - the path
      dp - true for adding the default port if it is missing
      Throws:
      IOException
  • Method Details

    • getBus

      public Bus getBus()
    • isOneWay

      protected final boolean isOneWay(Message message)
      Parameters:
      message - the message under consideration
      Returns:
      true iff the message has been marked as oneway
    • invoke

      public void invoke(jakarta.servlet.ServletConfig config, jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException
      Throws:
      IOException
    • invokeComplete

      protected void invokeComplete(jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, Message m) throws IOException
      Throws:
      IOException
    • setupMessage

      protected void setupMessage(Message inMessage, jakarta.servlet.ServletConfig config, jakarta.servlet.ServletContext context, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException
      Throws:
      IOException
    • retrieveFromContinuation

      protected Message retrieveFromContinuation(jakarta.servlet.http.HttpServletRequest req)
    • retrieveFromServlet3Async

      protected Message retrieveFromServlet3Async(jakarta.servlet.http.HttpServletRequest req)
    • setupContinuation

      protected void setupContinuation(Message inMessage, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    • getBasePath

      protected String getBasePath(String contextPath) throws IOException
      Throws:
      IOException
    • getAddressValue

      protected static EndpointInfo getAddressValue(EndpointInfo ei)
    • getAddressValue

      protected static EndpointInfo getAddressValue(EndpointInfo ei, boolean dp)
    • getInbuiltBackChannel

      protected Conduit getInbuiltBackChannel(Message inMessage)
      Specified by:
      getInbuiltBackChannel in class AbstractDestination
      Parameters:
      inMessage - the incoming message
      Returns:
      the inbuilt backchannel
    • flushHeaders

      protected OutputStream flushHeaders(Message outMessage) throws IOException
      Throws:
      IOException
    • flushHeaders

      protected OutputStream flushHeaders(Message outMessage, boolean getStream) throws IOException
      Throws:
      IOException
    • contextMatchOnExact

      protected boolean contextMatchOnExact()
    • finalizeConfig

      public void finalizeConfig()
    • getBeanName

      public String getBeanName()
      Description copied from interface: Configurable
      Get the configurable object's Bean name
      Specified by:
      getBeanName in interface Configurable
      Returns:
      the bean name
    • getAddressWithId

      public org.apache.cxf.ws.addressing.EndpointReferenceType getAddressWithId(String id)
      Description copied from class: AbstractMultiplexDestination
      Builds an new endpoint reference using the current target reference as a template. The supplied id is endcoded using a reference parameter. This requires the ws-a interceptors to propagate the reference parameters on subsequent invokes using the returned reference.
      Specified by:
      getAddressWithId in interface MultiplexDestination
      Overrides:
      getAddressWithId in class AbstractMultiplexDestination
      Parameters:
      id - the id to encode in the new reference
      Returns:
      the new reference with the id encoded as a reference parameter
      See Also:
    • getId

      public String getId(Map<String,Object> context)
      Description copied from class: AbstractMultiplexDestination
      Obtain id from reference parameters of the ws-a to address Requires the existance of ws-a interceptors on dispatch path to provide access to the ws-a headers
      Specified by:
      getId in interface MultiplexDestination
      Overrides:
      getId in class AbstractMultiplexDestination
      Parameters:
      context - the current invocation or message context
      Returns:
      the id from the reference parameters of the ws-a-to address or null if not found
      See Also:
    • getContextMatchStrategy

      public String getContextMatchStrategy()
    • setContextMatchStrategy

      public void setContextMatchStrategy(String contextMatchStrategy)
    • isFixedParameterOrder

      public boolean isFixedParameterOrder()
    • setFixedParameterOrder

      public void setFixedParameterOrder(boolean fixedParameterOrder)
    • isMultiplexWithAddress

      public boolean isMultiplexWithAddress()
    • setMultiplexWithAddress

      public void setMultiplexWithAddress(boolean multiplexWithAddress)
    • getServer

      public HTTPServerPolicy getServer()
    • setServer

      public void setServer(HTTPServerPolicy server)
    • assertMessage

      public void assertMessage(Message message)
      Specified by:
      assertMessage in interface Assertor
    • canAssert

      public boolean canAssert(QName type)
      Specified by:
      canAssert in interface Assertor
    • releaseRegistry

      public void releaseRegistry()
    • getPath

      public String getPath()
    • activate

      protected void activate()
      Description copied from class: AbstractObservable
      Activate messages flow.
      Overrides:
      activate in class AbstractObservable
    • deactivate

      protected void deactivate()
      Description copied from class: AbstractObservable
      Deactivate messages flow.
      Overrides:
      deactivate in class AbstractObservable
    • shutdown

      public void shutdown()
      Description copied from class: AbstractDestination
      Shutdown the Destination, i.e. stop accepting incoming messages.
      Specified by:
      shutdown in interface Destination
      Overrides:
      shutdown in class AbstractDestination