public interface AsynchronyCorrelator<AuditDatasetType extends WsAuditDataset>
Modifier and Type | Field and Description |
---|---|
static String |
FORCE_CORRELATION
When the Web Service context of an outgoing request message contains
Boolean.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. |
Modifier and Type | Method and 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, or
null if the message is unknown. |
String |
getCorrelationKey(String messageId)
Returns the user-defined correlation key for the message with the
given ID, or
null 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, or
null 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.
|
static final String FORCE_CORRELATION
Boolean.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.void storeServiceEndpointUri(String messageId, String serviceEndpointUri)
messageId
- WS-Addressing message ID of the request.serviceEndpointUri
- URL of the endpoint the request is being sent to.void storeCorrelationKey(String messageId, String correlationKey)
messageId
- WS-Addressing message ID of the request.correlationKey
- correlation key provided by the user.void storeAuditDataset(String messageId, WsAuditDataset auditDataset)
messageId
- WS-Addressing message ID of the request.auditDataset
- audit dataset.String getServiceEndpointUri(String messageId)
null
if the message is unknown.String getCorrelationKey(String messageId)
null
if the message is unknown or the
user did not provided any correlation key.AuditDatasetType getAuditDataset(String messageId)
null
if the message is unknown.void storeAlternativeKeys(String messageId, String... alternativeKeys)
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.
messageId
- WS-Addressing message ID of the request.alternativeKeys
- alternative keys, should be not null
.String getMessageId(String alternativeKey)
alternativeKey
- alternative key.null
when not found.boolean delete(String messageId)
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...).
true
when there actually was something to delete,
i.e. when the given ID was known; false
otherwise.Copyright © 2018 Open eHealth Foundation. All rights reserved.