Interface CorrelationManager<T>
public interface CorrelationManager<T>
Correlation manager stores objects with a correlation key. Clients can access the same objects
some time later with same correlation key. This mechanism is used in synchronous communication where
request and response messages are stored for correlating consumer and producer components.
- Since:
- 2.0
- Author:
- Christoph Deppisch
-
Method Summary
Modifier and TypeMethodDescriptionFinds stored object by its correlation key.getCorrelationKey(String correlationKeyName, TestContext context) Gets correlation key for given identifier.Gets the object store implementation.voidsaveCorrelationKey(String correlationKeyName, String correlationKey, TestContext context) Creates new correlation key in test context by saving as test variable.voidsetObjectStore(ObjectStore<T> store) Sets the object store implementationvoidStore object to correlation storage using the given correlation key.
-
Method Details
-
saveCorrelationKey
Creates new correlation key in test context by saving as test variable. Method is called when synchronous communication is initialized.- Parameters:
correlationKeyName-correlationKey-context-
-
getCorrelationKey
Gets correlation key for given identifier. Consults test context with test variables for retrieving stored correlation key.- Parameters:
correlationKeyName-context-- Returns:
-
store
Store object to correlation storage using the given correlation key.- Parameters:
correlationKey-object-
-
find
Finds stored object by its correlation key.- Parameters:
correlationKey-timeout-- Returns:
-
setObjectStore
Sets the object store implementation- Parameters:
store-
-
getObjectStore
ObjectStore<T> getObjectStore()Gets the object store implementation.- Returns:
-