Class RequestDispatchingEndpointAdapter
java.lang.Object
org.citrusframework.endpoint.AbstractEndpointAdapter
org.citrusframework.endpoint.adapter.StaticEndpointAdapter
org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter
- All Implemented Interfaces:
org.citrusframework.endpoint.EndpointAdapter
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.citrusframework.message.MessagedispatchMessage(org.citrusframework.message.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.org.citrusframework.endpoint.adapter.mapping.MappingKeyExtractorGets the mapping name extractor.org.citrusframework.endpoint.adapter.mapping.EndpointAdapterMappingStrategyGets the endpoint adapter mapping strategy.protected org.citrusframework.message.MessagehandleMessageInternal(org.citrusframework.message.Message message) Subclasses must implement this method in order to handle incoming request message.voidsetMappingKeyExtractor(org.citrusframework.endpoint.adapter.mapping.MappingKeyExtractor mappingKeyExtractor) Sets the mapping name extractor implementation.voidsetMappingStrategy(org.citrusframework.endpoint.adapter.mapping.EndpointAdapterMappingStrategy mappingStrategy) Sets the endpoint adapter mapping strategy.Methods inherited from class org.citrusframework.endpoint.adapter.StaticEndpointAdapter
getEndpoint, getEndpointConfiguration, withReuseMessageMethods inherited from class org.citrusframework.endpoint.AbstractEndpointAdapter
getFallbackEndpointAdapter, getName, getTestContext, getTestContextFactory, handleMessage, setFallbackEndpointAdapter, setName, setTestContextFactory
-
Constructor Details
-
RequestDispatchingEndpointAdapter
public RequestDispatchingEndpointAdapter()
-
-
Method Details
-
handleMessageInternal
protected org.citrusframework.message.Message handleMessageInternal(org.citrusframework.message.Message message) Description copied from class:AbstractEndpointAdapterSubclasses 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.- Overrides:
handleMessageInternalin classStaticEndpointAdapter- Returns:
-
dispatchMessage
public org.citrusframework.message.Message dispatchMessage(org.citrusframework.message.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 org.citrusframework.endpoint.adapter.mapping.MappingKeyExtractor getMappingKeyExtractor()Gets the mapping name extractor.- Returns:
-
setMappingKeyExtractor
public void setMappingKeyExtractor(org.citrusframework.endpoint.adapter.mapping.MappingKeyExtractor mappingKeyExtractor) Sets the mapping name extractor implementation.- Parameters:
mappingKeyExtractor-
-
getMappingStrategy
public org.citrusframework.endpoint.adapter.mapping.EndpointAdapterMappingStrategy getMappingStrategy()Gets the endpoint adapter mapping strategy.- Returns:
-
setMappingStrategy
public void setMappingStrategy(org.citrusframework.endpoint.adapter.mapping.EndpointAdapterMappingStrategy mappingStrategy) Sets the endpoint adapter mapping strategy.- Parameters:
mappingStrategy-
-