Class PollingCorrelationManager<T>
- java.lang.Object
-
- com.consol.citrus.message.correlation.DefaultCorrelationManager<T>
-
- com.consol.citrus.message.correlation.PollingCorrelationManager<T>
-
- All Implemented Interfaces:
com.consol.citrus.message.correlation.CorrelationManager<T>
public class PollingCorrelationManager<T> extends DefaultCorrelationManager<T>
Extension of default correlation manager adds polling mechanism for find operation on object store. In case object is not found in store retry is automatically performed. Polling interval and overall retry timeout is usually defined in endpoint configuration.- Since:
- 2.1
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description PollingCorrelationManager(com.consol.citrus.endpoint.PollableEndpointConfiguration endpointConfiguration, String retryLogMessage)
Constructor using fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
find(String correlationKey)
Convenience method for using default timeout settings of endpoint configuration.T
find(String correlationKey, long timeout)
String
getCorrelationKey(String correlationKeyName, com.consol.citrus.context.TestContext context)
String
getRetryLogMessage()
Gets the retry log message-
Methods inherited from class com.consol.citrus.message.correlation.DefaultCorrelationManager
getObjectStore, saveCorrelationKey, setObjectStore, store
-
-
-
-
Constructor Detail
-
PollingCorrelationManager
public PollingCorrelationManager(com.consol.citrus.endpoint.PollableEndpointConfiguration endpointConfiguration, String retryLogMessage)
Constructor using fields.- Parameters:
endpointConfiguration
-retryLogMessage
-
-
-
Method Detail
-
find
public T find(String correlationKey)
Convenience method for using default timeout settings of endpoint configuration.- Parameters:
correlationKey
-- Returns:
-
getCorrelationKey
public String getCorrelationKey(String correlationKeyName, com.consol.citrus.context.TestContext context)
- Specified by:
getCorrelationKey
in interfacecom.consol.citrus.message.correlation.CorrelationManager<T>
- Overrides:
getCorrelationKey
in classDefaultCorrelationManager<T>
-
find
public T find(String correlationKey, long timeout)
- Specified by:
find
in interfacecom.consol.citrus.message.correlation.CorrelationManager<T>
- Overrides:
find
in classDefaultCorrelationManager<T>
-
getRetryLogMessage
public String getRetryLogMessage()
Gets the retry log message- Returns:
-
-