Interface AsynchronyCorrelator<AuditDatasetType extends WsAuditDataset>
- All Known Implementing Classes:
EhcacheAsynchronyCorrelator
,SpringCacheAsynchronyCorrelator
public interface AsynchronyCorrelator<AuditDatasetType extends WsAuditDataset>
Interface for message correlators in asynchronous
Web Service-based eHealth transactions.
- Author:
- Dmytro Rud
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
When the Web Service context of an outgoing request message containsBoolean.TRUE
value in the property with this name, then correlation items of this request message will be stored in the configured asynchrony correlator instance, even when the WS-Addressing <ReplyTo> header is not set. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deletes information pieces about the message with the given ID.getAuditDataset
(String messageId) Returns the audit dataset for the request message with the given ID, ornull
if the message is unknown.getCorrelationKey
(String messageId) Returns the user-defined correlation key for the message with the given ID, ornull
if the message is unknown or the user did not provided any correlation key.getMessageId
(String alternativeKey) Determines WS-Addressing message ID ("primary key") which corresponds to the given alternative key.getServiceEndpointUri
(String messageId) Returns the URI of the endpoint to which the message with the given ID has been sent, ornull
if the message is unknown.void
storeAlternativeKeys
(String messageId, String... alternativeKeys) Stores a set of alternative keys for the message with the given WS-Addressing ID.void
storeAuditDataset
(String messageId, WsAuditDataset auditDataset) Stores audit dataset.void
storeCorrelationKey
(String messageId, String correlationKey) Stores a user-defined correlation key.void
storeServiceEndpointUri
(String messageId, String serviceEndpointUri) Stores a service endpoint URI.
-
Field Details
-
FORCE_CORRELATION
When the Web Service context of an outgoing request message containsBoolean.TRUE
value in the property with this name, then correlation items of this request message will be stored in the configured asynchrony correlator instance, even when the WS-Addressing <ReplyTo> header is not set.
-
-
Method Details
-
storeServiceEndpointUri
Stores a service endpoint URI.- Parameters:
messageId
- WS-Addressing message ID of the request.serviceEndpointUri
- URL of the endpoint the request is being sent to.
-
storeCorrelationKey
Stores a user-defined correlation key.- Parameters:
messageId
- WS-Addressing message ID of the request.correlationKey
- correlation key provided by the user.
-
storeAuditDataset
Stores audit dataset.- Parameters:
messageId
- WS-Addressing message ID of the request.auditDataset
- audit dataset.
-
getServiceEndpointUri
Returns the URI of the endpoint to which the message with the given ID has been sent, ornull
if the message is unknown. -
getCorrelationKey
Returns the user-defined correlation key for the message with the given ID, ornull
if the message is unknown or the user did not provided any correlation key. -
getAuditDataset
Returns the audit dataset for the request message with the given ID, ornull
if the message is unknown. -
storeAlternativeKeys
Stores a set of alternative keys for the message with the given WS-Addressing ID. When the <RelatesTo> header of the incoming response does not contain a valid/a known message ID for correlation, the system will use transaction-specific mechanisms to extract additional keys from the message body and to perform the correlation of their basis.The correlator must maintain bi-directional correspondence between the "primary" key (WS-Addressing message ID of the request) and the alternative keys. The uniqueness of the alternative keys should be provided, but cannot be guaranteed.
- Parameters:
messageId
- WS-Addressing message ID of the request.alternativeKeys
- alternative keys, should be notnull
.
-
getMessageId
Determines WS-Addressing message ID ("primary key") which corresponds to the given alternative key.- Parameters:
alternativeKey
- alternative key.- Returns:
- WS-Addressing message ID or
null
when not found.
-
delete
Deletes information pieces about the message with the given ID.This method is supposed to be called internally after the correlation of an asynchronous response has been completed; the user does not have to call it explicitly (but who knows...).
- Returns:
true
when there actually was something to delete, i.e. when the given ID was known;false
otherwise.
-