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
Fields Modifier and Type Field Description static String
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
delete(String messageId)
Deletes information pieces about the message with the given ID.AuditDatasetType
getAuditDataset(String messageId)
Returns the audit dataset for the request message with the given ID, ornull
if the message is unknown.String
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.String
getMessageId(String alternativeKey)
Determines WS-Addressing message ID ("primary key") which corresponds to the given alternative key.String
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 Detail
-
FORCE_CORRELATION
static final String 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 Detail
-
storeServiceEndpointUri
void storeServiceEndpointUri(String messageId, String serviceEndpointUri)
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
void storeCorrelationKey(String messageId, String correlationKey)
Stores a user-defined correlation key.- Parameters:
messageId
- WS-Addressing message ID of the request.correlationKey
- correlation key provided by the user.
-
storeAuditDataset
void storeAuditDataset(String messageId, WsAuditDataset auditDataset)
Stores audit dataset.- Parameters:
messageId
- WS-Addressing message ID of the request.auditDataset
- audit dataset.
-
getServiceEndpointUri
String 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.
-
getCorrelationKey
String 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.
-
getAuditDataset
AuditDatasetType getAuditDataset(String messageId)
Returns the audit dataset for the request message with the given ID, ornull
if the message is unknown.
-
storeAlternativeKeys
void storeAlternativeKeys(String messageId, String... alternativeKeys)
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
String getMessageId(String alternativeKey)
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
boolean delete(String messageId)
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.
-
-