public class ITKMessagePropertiesImpl extends Object implements ITKMessageProperties
BUSINESS_ACK_HANDLING_SPECIFICATION_KEY, INTERACTION_HANDLING_SPECIFICATION_KEY| Constructor and Description |
|---|
ITKMessagePropertiesImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlingSpecification(String key,
String value)
Allows the message originator to add a handling specification to the
associated
ITKMessage.Handling specifications provide an extensible mechanism for the message originator to attach special processing instructions with the message. |
static ITKMessageProperties |
build(Document distributionEnvelope)
Builds the.
|
static Document |
extractDistributionEnvelopeFromSoap(Document doc)
Extract distribution envelope from soap.
|
ITKIdentity |
getAuditIdentity()
Returns the audit identity of the ITK message originator
|
String |
getBusinessPayloadId()
Obtains the business payloadId associated with this
message.
|
ITKAddress |
getFromAddress()
Obtains the originators ITK address
|
String |
getHandlingSpecification(String key)
Convenience method that allows the value of the handling specification
to be obtained directly.
|
Map<String,String> |
getHandlingSpecifications()
Obtains the Map of the handling specifications associated with the
ITKMessage.Handling specifications provide an extensible mechanism for the message originator to attach special processing instructions with the message. |
ITKTransportProperties |
getInboundTransportProperties()
Obtains the
ITKTransportProperties that are associated with the
ITKMessage that was received by the service provider on the inbound
leg in an asynchronous request/response invocation.The inboundITKTransportProperties are not expected to
be processed by the application layer, however where present
the application layer is responsible for attaching the
inboundITKTransportProperties to any responses generated
such that these transport properties are available to the transport layers
transmitting the response.A typical use of this mechanism is for the propagation of the <wsa:replyTo/> address such that it is available to the
to the transport layers managing the "reply".Note although this pattern adds some additional burden on the application layer it offers significant advantages over the alternative where the transport layer has to maintain state and correlate messages - potentially over several distributed nodes |
String |
getProfileId()
Obtains the profileId associated with the ITKMessage.
|
String |
getServiceId()
ITK message service associated with the message
|
ITKAddress |
getToAddress()
Obtains the destination address for the associated ITK Message.
Note Whilst the ITK Specifications allow for multiple recipients to be specified this version of the ITK API only supports a single recipient to be defined as this satisfies the majority of anticipated use-cases. |
String |
getTrackingId()
Obtains the tracking id associated with the ITKMessage
when sending the message between two or more endpoints.
|
void |
setAuditIdentity(ITKIdentity auditIdentity)
Sets the audit identity of the message originator
|
void |
setBusinessPayloadId(String businessPayloadId)
Sets the business payloadId associated with this
message.
|
void |
setFromAddress(ITKAddress fromAddress)
Sets the originators address for this message.
|
void |
setInboundTransportProperties(ITKTransportProperties inboundTransportProperties)
Sets the
ITKTransportProperties that are associated with the
ITKMessage that was received by the service provider on the inbound
leg in an asynchronous request/response invocation.The inboundITKTransportProperties are not expected to
be processed by the application layer, however where present
the application layer is responsible for attaching the
inboundITKTransportProperties to any responses generated
such that these transport properties are available to the transport layers
transmitting the response.A typical use of this mechanism is for the propagation of the <wsa:replyTo/> URL such that it is available to the
to the transport layers managing the "reply".Note although this pattern adds some additional burden on the application layer it offers significant advantages over the alternative where the transport layer has to maintain state and correlate messages - potentially over several distributed nodes |
void |
setProfileId(String profileId)
Sets the profileId associated with the ITKMessage.
|
void |
setServiceId(String serviceId)
Sets the ITK message serviceId associated with this message
|
void |
setToAddress(ITKAddress toAddress)
Sets the destination address for the associated ITK Message.
Note Whilst the ITK Specifications allow for multiple recipients to be specified this version of the ITK API only supports a single recipient to be defined as this satisfies the majority of anticipated use-cases. |
void |
setTrackingId(String trackingId)
Sets the tracking id associated with the ITKMessage
prior to sending the message between two or more endpoints.
|
public String getTrackingId()
ITKMessagePropertiesITKMessageProperties.getBusinessPayloadId().ITKAckDetails.getTrackingRef())
and ITK Business Acknowledgements.getTrackingId in interface ITKMessagePropertiespublic void setTrackingId(String trackingId)
ITKMessagePropertiesITKMessageProperties.setBusinessPayloadId(String).ITKAckDetails.getTrackingRef())
and ITK Business Acknowledgements.setTrackingId in interface ITKMessagePropertiestrackingId - a String UUID representing the tracking Id
for this transmission. Note if the message is resent a new tracking
Id should be createdpublic ITKAddress getFromAddress()
ITKMessagePropertiesgetFromAddress in interface ITKMessagePropertiespublic void setFromAddress(ITKAddress fromAddress)
ITKMessagePropertiessetFromAddress in interface ITKMessagePropertiesfromAddress - the ITKAddress object with the address details of the message
originatorpublic ITKAddress getToAddress()
ITKMessagePropertiesgetToAddress in interface ITKMessagePropertiespublic void setToAddress(ITKAddress toAddress)
ITKMessagePropertiessetToAddress in interface ITKMessagePropertiestoAddress - the ITKAddress object containing the address details of the
intended recipientpublic ITKIdentity getAuditIdentity()
ITKMessagePropertiesgetAuditIdentity in interface ITKMessagePropertiespublic void setAuditIdentity(ITKIdentity auditIdentity)
ITKMessagePropertiessetAuditIdentity in interface ITKMessagePropertiespublic String getServiceId()
ITKMessagePropertiesgetServiceId in interface ITKMessagePropertiespublic void setServiceId(String serviceId)
ITKMessagePropertiessetServiceId in interface ITKMessagePropertiesserviceId - The String identifying the ITK Service (from ITK Domain Message Specifications)public String getBusinessPayloadId()
ITKMessagePropertiesITKMessageProperties.getTrackingId() as it is an id that is
typically embedded somewhere in the business payload - for
example as a document instance id in a CDA message, whereas
the ITKMessageProperties.getTrackingId() is specifically an id assigned
when sending the message between two or more endpoints and
should not have meaning beyond the original ITK transmission and
associated acknowledgements.getBusinessPayloadId in interface ITKMessagePropertiespublic void setBusinessPayloadId(String businessPayloadId)
ITKMessagePropertiessetBusinessPayloadId in interface ITKMessagePropertiesbusinessPayloadId - The UUID associated with the
ITK Message business payloadpublic String getProfileId()
ITKMessagePropertiesgetProfileId in interface ITKMessagePropertiesnhs-en:profile:nonCodedCDADocument-v2-0)public void setProfileId(String profileId)
ITKMessagePropertiessetProfileId in interface ITKMessagePropertiesprofileId - The profile id (e.g. nhs-en:profile:nonCodedCDADocument-v2-0)public ITKTransportProperties getInboundTransportProperties()
ITKMessagePropertiesITKTransportProperties that are associated with the
ITKMessage that was received by the service provider on the inbound
leg in an asynchronous request/response invocation.inboundITKTransportProperties are not expected to
be processed by the application layer, however where present
the application layer is responsible for attaching the
inboundITKTransportProperties to any responses generated
such that these transport properties are available to the transport layers
transmitting the response.<wsa:replyTo/> address such that it is available to the
to the transport layers managing the "reply".getInboundTransportProperties in interface ITKMessagePropertiesinboundITKTransportProperties - the ITKTransportProperties that
were obtained from the inbound message.public void setInboundTransportProperties(ITKTransportProperties inboundTransportProperties)
ITKMessagePropertiesITKTransportProperties that are associated with the
ITKMessage that was received by the service provider on the inbound
leg in an asynchronous request/response invocation.inboundITKTransportProperties are not expected to
be processed by the application layer, however where present
the application layer is responsible for attaching the
inboundITKTransportProperties to any responses generated
such that these transport properties are available to the transport layers
transmitting the response.<wsa:replyTo/> URL such that it is available to the
to the transport layers managing the "reply".setInboundTransportProperties in interface ITKMessagePropertiesinboundTransportProperties - The ITKTransportProperties that
were obtained from the inbound message.public Map<String,String> getHandlingSpecifications()
ITKMessagePropertiesITKMessage.ITKMessageProperties.BUSINESS_ACK_HANDLING_SPECIFICATION_KEY), and one to explicitly
associated an interaction Id with the message
(ITKMessageProperties.INTERACTION_HANDLING_SPECIFICATION_KEY).getHandlingSpecifications in interface ITKMessagePropertiesMap of all handling specifications associated
with the message. For each entry in the Map contains both the key
(e.g. urn:nhs:itk:ns:201005:ackrequested) and the
associated value. If no handling specifications are associated
with the message then an empty map is returned.public void addHandlingSpecification(String key, String value)
ITKMessagePropertiesITKMessage.ITKMessageProperties.BUSINESS_ACK_HANDLING_SPECIFICATION_KEY), and one to explicitly
associated an interaction Id with the message
(ITKMessageProperties.INTERACTION_HANDLING_SPECIFICATION_KEY).addHandlingSpecification in interface ITKMessagePropertieskey - The handling specification key - for instance
ITKMessageProperties.BUSINESS_ACK_HANDLING_SPECIFICATION_KEYvalue - The appropriate value for the handling specificationpublic String getHandlingSpecification(String key)
ITKMessagePropertiesgetHandlingSpecification in interface ITKMessagePropertieskey - The handling specification key - for instance ITKMessageProperties.BUSINESS_ACK_HANDLING_SPECIFICATION_KEYvalue associated with the provided key or null if the
handling specification indicated by the key was not presentpublic static Document extractDistributionEnvelopeFromSoap(Document doc) throws ITKMessagingException
doc - the docITKMessagingException - the iTK messaging exceptionpublic static ITKMessageProperties build(Document distributionEnvelope) throws ITKMessagingException
distributionEnvelope - the distribution envelopeITKMessagingException - the iTK messaging exceptionAll content is available under the Open Government Licence, except where otherwise stated
All example source code is available under Apache 2.0, except where otherwise stated