Class RequestDispatchingEndpointAdapter
- java.lang.Object
-
- com.consol.citrus.endpoint.AbstractEndpointAdapter
-
- com.consol.citrus.endpoint.adapter.StaticEndpointAdapter
-
- com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter
-
- All Implemented Interfaces:
com.consol.citrus.endpoint.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
- Author:
- Christoph Deppisch
-
-
Field Summary
-
Fields inherited from class com.consol.citrus.endpoint.AbstractEndpointAdapter
log
-
-
Constructor Summary
Constructors Constructor Description RequestDispatchingEndpointAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.consol.citrus.message.Message
dispatchMessage(com.consol.citrus.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.com.consol.citrus.endpoint.adapter.mapping.MappingKeyExtractor
getMappingKeyExtractor()
Gets the mapping name extractor.com.consol.citrus.endpoint.adapter.mapping.EndpointAdapterMappingStrategy
getMappingStrategy()
Gets the endpoint adapter mapping strategy.protected com.consol.citrus.message.Message
handleMessageInternal(com.consol.citrus.message.Message message)
Subclasses must implement this method in order to handle incoming request message.void
setMappingKeyExtractor(com.consol.citrus.endpoint.adapter.mapping.MappingKeyExtractor mappingKeyExtractor)
Sets the mapping name extractor implementation.void
setMappingStrategy(com.consol.citrus.endpoint.adapter.mapping.EndpointAdapterMappingStrategy mappingStrategy)
Sets the endpoint adapter mapping strategy.-
Methods inherited from class com.consol.citrus.endpoint.adapter.StaticEndpointAdapter
getEndpoint, getEndpointConfiguration
-
Methods inherited from class com.consol.citrus.endpoint.AbstractEndpointAdapter
getFallbackEndpointAdapter, getName, getTestContext, getTestContextFactory, handleMessage, setFallbackEndpointAdapter, setName, setTestContextFactory
-
-
-
-
Method Detail
-
handleMessageInternal
protected com.consol.citrus.message.Message handleMessageInternal(com.consol.citrus.message.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 classAbstractEndpointAdapter
- Returns:
-
dispatchMessage
public com.consol.citrus.message.Message dispatchMessage(com.consol.citrus.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 com.consol.citrus.endpoint.adapter.mapping.MappingKeyExtractor getMappingKeyExtractor()
Gets the mapping name extractor.- Returns:
-
setMappingKeyExtractor
public void setMappingKeyExtractor(com.consol.citrus.endpoint.adapter.mapping.MappingKeyExtractor mappingKeyExtractor)
Sets the mapping name extractor implementation.- Parameters:
mappingKeyExtractor
-
-
getMappingStrategy
public com.consol.citrus.endpoint.adapter.mapping.EndpointAdapterMappingStrategy getMappingStrategy()
Gets the endpoint adapter mapping strategy.- Returns:
-
setMappingStrategy
public void setMappingStrategy(com.consol.citrus.endpoint.adapter.mapping.EndpointAdapterMappingStrategy mappingStrategy)
Sets the endpoint adapter mapping strategy.- Parameters:
mappingStrategy
-
-
-