Class RequestDispatchingEndpointAdapter

All Implemented Interfaces:
EndpointAdapter

public class RequestDispatchingEndpointAdapter extends StaticEndpointAdapter
Base endpoint adapter implementation that dispatches incoming messages according to some extracted message value as mapping key and a endpoint adapter mapping. Once adapter mapping identified proper endpoint adapter implementation the incoming request is forwarded to this adapter for further processing steps.
Since:
1.4
  • Constructor Details

    • RequestDispatchingEndpointAdapter

      public RequestDispatchingEndpointAdapter()
  • Method Details

    • handleMessageInternal

      protected Message handleMessageInternal(Message message)
      Description copied from class: AbstractEndpointAdapter
      Subclasses must implement this method in order to handle incoming request message. If this method does not return any response message fallback endpoint adapter is invoked for processing.
      Specified by:
      handleMessageInternal in class AbstractEndpointAdapter
      Returns:
    • dispatchMessage

      public Message dispatchMessage(Message request, String mappingKey)
      Consolidate mapping strategy in order to find dispatch incoming request to endpoint adapter according to mapping key that was extracted before from message content.
      Parameters:
      request -
      mappingKey -
      Returns:
    • getMappingKeyExtractor

      public MappingKeyExtractor getMappingKeyExtractor()
      Gets the mapping name extractor.
      Returns:
    • setMappingKeyExtractor

      public void setMappingKeyExtractor(MappingKeyExtractor mappingKeyExtractor)
      Sets the mapping name extractor implementation.
      Parameters:
      mappingKeyExtractor -
    • getMappingStrategy

      public EndpointAdapterMappingStrategy getMappingStrategy()
      Gets the endpoint adapter mapping strategy.
      Returns:
    • setMappingStrategy

      public void setMappingStrategy(EndpointAdapterMappingStrategy mappingStrategy)
      Sets the endpoint adapter mapping strategy.
      Parameters:
      mappingStrategy -