public interface ITKMessageProperties
ITKMessage
Modifier and Type | Field and Description |
---|---|
static String |
BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
The handling specification key for the property that allows the message originator
to specify whether or not they would like a business Acknowledgement.
Permissible values for this handling specification are the Strings true
or false |
static String |
INTERACTION_HANDLING_SPECIFICATION_KEY
The handling specification key for the property that allows the message originator
to explicitly specify the interaction id of the message.
The value for this handling specification should be the interaction id of the message - e.g. |
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. |
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 inboundITKTransportProperties)
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.
|
static final String BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
true
or false
static final String INTERACTION_HANDLING_SPECIFICATION_KEY
urn:nhs-itk:interaction:verifyNHSNumberRequest-v1-0
ITKAddress getFromAddress()
void setFromAddress(ITKAddress fromAddress)
fromAddress
- the ITKAddress object with the address details of the message
originatorITKAddress getToAddress()
void setToAddress(ITKAddress toAddress)
toAddress
- the ITKAddress object containing the address details of the
intended recipientITKIdentity getAuditIdentity()
void setAuditIdentity(ITKIdentity auditIdentity)
An
- ITKIdentity object containing the audit idString getServiceId()
void setServiceId(String serviceId)
serviceId
- The String identifying the ITK Service (from ITK Domain Message Specifications)String getBusinessPayloadId()
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 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.void setBusinessPayloadId(String businessPayloadId)
businessPayloadId
- The UUID associated with the
ITK Message business payloadString getProfileId()
nhs-en:profile:nonCodedCDADocument-v2-0
)void setProfileId(String profileId)
profileId
- The profile id (e.g. nhs-en:profile:nonCodedCDADocument-v2-0
)String getTrackingId()
getBusinessPayloadId()
.ITKAckDetails.getTrackingRef()
)
and ITK Business Acknowledgements.void setTrackingId(String trackingId)
setBusinessPayloadId(String)
.ITKAckDetails.getTrackingRef()
)
and ITK Business Acknowledgements.trackingId
- a String UUID representing the tracking Id
for this transmission. Note if the message is resent a new tracking
Id should be createdvoid setInboundTransportProperties(ITKTransportProperties inboundITKTransportProperties)
ITKTransportProperties
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".inboundITKTransportProperties
- The ITKTransportProperties
that
were obtained from the inbound message.ITKTransportProperties getInboundTransportProperties()
ITKTransportProperties
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".inboundITKTransportProperties
- the ITKTransportProperties
that
were obtained from the inbound message.Map<String,String> getHandlingSpecifications()
ITKMessage
.BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
), and one to explicitly
associated an interaction Id with the message
(INTERACTION_HANDLING_SPECIFICATION_KEY
).Map
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.void addHandlingSpecification(String key, String value)
ITKMessage
.BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
), and one to explicitly
associated an interaction Id with the message
(INTERACTION_HANDLING_SPECIFICATION_KEY
).key
- The handling specification key - for instance
BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
value
- The appropriate value
for the handling specificationString getHandlingSpecification(String key)
key
- The handling specification key - for instance BUSINESS_ACK_HANDLING_SPECIFICATION_KEY
value
associated with the provided key or null
if the
handling specification indicated by the key was not presentAll 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