public interface Message
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(java.lang.String key,
MessageFormat att)
Add an attachment to the message identified by the specified key
|
void |
addException(ErrorInfo e)
Attach an error that this message encountered
|
void |
addException(java.lang.Exception e)
Attach an Exception that this message encountered
|
void |
addMessageFileForRelease(MessageFile mf)
Associate a MessageFile (a temporary file) for release back to the FileCache, once this message completes.
|
void |
addMessageFormatForRelease(MessageFormat mf)
Link a MessageFormat (i.e.
|
void |
addMessageForRelease(Message m)
Link a Message for GC along with this message
|
void |
addMessageProperty(java.lang.String key,
java.lang.Object value)
Add a message property - i.e.
|
void |
addResponseCorrelation(java.lang.String key,
java.lang.Object value)
Add an entry for correlation into the response message for this message.
|
void |
addTransportHeader(java.lang.String key,
java.lang.String value)
Add a transport header to this message
|
void |
beginTransaction()
Begin a transaction using the default (i.e.
|
void |
beginTransaction(java.lang.String transactionManagerBeanId)
Begin a new Spring transaction and associate its context with this message
|
Message |
cloneMessage()
Clone the current message - without transport headers, properties or payload.
|
void |
commitTransaction()
Invoked to request a commit of the current transaction
|
boolean |
containsAttachments()
Does this message contain attachments?
|
Message |
createDefaultResponseMessage()
Create the default response message to this message
|
MessageFormat |
detachPayload()
Detach the current payload from this message.
|
MessageFormat |
getAttachment(java.lang.String key)
Get the attachment with the given key
|
java.util.Map |
getAttachments()
Return the Map of attachments keyed with the identifying string
|
long |
getBaseTime()
Gets the base time at which the original request message has been created of the current transaction, giving
an relative base for any time to be taken in nano-ticks.
|
java.lang.String |
getContentType()
Get the content type of the message if set.
|
java.util.UUID |
getCorrelatedRequestUUID()
The request message UUID for a response message
|
MessageFormat |
getCurrentPayload()
Get the current payload of the message
|
java.lang.String |
getDestinationURL()
Get the current destination URL for this message.
|
java.util.Map |
getDuplicateTransportHeaders()
Get the map of current transport header duplicate values
|
java.util.List |
getExceptions()
Get a list of errors this message encountered
|
java.lang.String |
getFirstTransportHeader(java.lang.String key)
Get the first transport header with the given key
|
java.lang.String |
getFirstTransportHeaderIgnoreCase(java.lang.String key)
This will perform a case insensitive lookup for the first occurrence of the given transport header
|
java.lang.String |
getLastAddressValue()
Return the address value (e.g.
|
ErrorInfo |
getLastException()
Get the last error encountered and linked to this message
|
java.lang.String |
getLastSentURL()
Return the absolute URL to which the corresponding request message, or this message was last sent
|
Mediation |
getMediation()
Return a reference to Mediation utilities
|
java.util.Map |
getMessageProperties()
Return current message properties as an unmodifiable map
|
java.lang.Object |
getMessageProperty(java.lang.String key)
Get the message property associated with the specified key
|
java.lang.Object |
getMessageProperty(java.lang.String key,
java.lang.Class cls)
Get the message property associated with the specified key as a typed object of type T
|
java.util.UUID |
getMessageUUID()
Get the UUID of the message
|
MessageFormat |
getOriginalPayload()
The original payload of the message - as received from the transport, unless modified
|
java.lang.String |
getOriginatingTransport()
Get originating transport
|
java.util.UUID |
getParentMessageUUID()
The parent message UUID
|
java.lang.String |
getProxyServiceID()
Get the id of the proxy service to which this message belongs
|
java.lang.String |
getRequestContentType()
Return the content type of the original request.
|
java.lang.String |
getStringMessageProperty(java.lang.String key)
Get the String message property associated with the specified key
|
java.util.UUID |
getTransactionUUID()
The UUID that uniquely identifies a single transaction.
|
java.util.Map |
getTransportHeaders()
Get the map of current transport header values ignoring duplicates
|
java.util.List |
getTransportHeaders(java.lang.String key)
Get a List of transport header values for the given key
|
org.springframework.transaction.TransactionStatus |
getTxnStatus()
Get the Spring TransactionStatus for this message
|
boolean |
hasMessageProperty(java.lang.String key)
Checks whether the give property is present in the message properties map
|
void |
holdCompletion()
Used to hold execution of the message completion handlers when the current sequence completes.
|
boolean |
isDropped()
Is this message marked to be dropped by in/out endpoints and subsequent sequence invocations?
|
boolean |
isHoldCompletionTask()
Is this message currently marked to hold completion tasks on at the end of the execution thread
(e.g.
|
boolean |
isMarkedAsFailed()
Is this message currently marked as failed?
|
boolean |
isRequest()
Is this message a request message?
|
boolean |
isResponse()
Is this message a response message?
|
void |
removeAllTransportHeaders()
Remove all transport headers
|
void |
removeMessageProperty(java.lang.String key)
Remove the message property associated with the specified key
|
void |
removeTransportHeader(java.lang.String key)
Remove all occurrences of the specified transport header
|
void |
removeTransportHeaders(java.lang.String list)
Remove transport headers specified in the comma separated list
|
void |
replaceTransportHeader(java.lang.String key,
java.lang.String value)
Replace the first occurrence of the transport header with the given value
|
void |
resumeAndCommitTransaction()
To be invoked typically in an async-response flow to re-energize a suspended transaction, and then commit
Note.
|
void |
resumeAndRollbackTransaction()
To be invoked typically in an async-response flow to re-energize a suspended transaction, and then rollback
Note.
|
void |
resumeTransaction()
To be invoked typically in an async-response flow to re-energize a suspended transaction
Note.
|
void |
retainOnlyTransportHeaders(java.lang.String list)
Retain only transport headers specified in the comma separated list
|
void |
rollbackTransaction()
Invoked to request a rollback of the current transaction
|
void |
setContentType(java.lang.String contentType)
Set the content type of the message
|
void |
setCurrentPayload(MessageFormat currentPayload)
Set the current payload of the message
|
void |
setDestinationURL(java.lang.String destinationURL)
Set the destination URL for this message
|
void |
setMarkedAsFailed(boolean markedAsFailed)
Mark this message as failed, by passing true.
|
void |
suspendTransaction()
Suspend a transaction using the default (i.e.
|
void |
suspendTransaction(java.lang.String transactionManagerBeanId)
Invoked typically in a request flow to suspend the active transaction, and to save its state
into the response correlation map
|
boolean isMarkedAsFailed()
boolean isDropped()
void setMarkedAsFailed(boolean markedAsFailed)
markedAsFailed
- true marks this message as failedboolean isHoldCompletionTask()
void holdCompletion()
MessageFormat getCurrentPayload()
void setCurrentPayload(MessageFormat currentPayload)
currentPayload
- the new payload of the messagevoid addAttachment(java.lang.String key, MessageFormat att)
key
- the identification key for the attachmentatt
- the attachment payloadMessageFormat getAttachment(java.lang.String key)
key
- the identifier of the attachmentboolean containsAttachments()
java.util.Map getAttachments()
MessageFormat getOriginalPayload()
MessageFormat detachPayload()
java.lang.String getFirstTransportHeader(java.lang.String key)
key
- the header namejava.lang.String getFirstTransportHeaderIgnoreCase(java.lang.String key)
key
- the case insensitive header namevoid addTransportHeader(java.lang.String key, java.lang.String value)
key
- header namevalue
- header valuevoid removeTransportHeader(java.lang.String key)
key
- header name to removevoid removeAllTransportHeaders()
void removeTransportHeaders(java.lang.String list)
list
- a list of comma separated transport headers to removevoid retainOnlyTransportHeaders(java.lang.String list)
list
- a list of comma separated transport headers to retainvoid replaceTransportHeader(java.lang.String key, java.lang.String value)
key
- the header namevalue
- the new valuejava.util.List getTransportHeaders(java.lang.String key)
java.util.Map getTransportHeaders()
java.util.Map getDuplicateTransportHeaders()
void addMessageProperty(java.lang.String key, java.lang.Object value)
key
- property keyvalue
- property valuejava.lang.Object getMessageProperty(java.lang.String key)
key
- property keyjava.lang.Object getMessageProperty(java.lang.String key, java.lang.Class cls)
key
- the property keycls
- the class of the property typejava.lang.String getStringMessageProperty(java.lang.String key)
key
- property keyvoid removeMessageProperty(java.lang.String key)
key
- property keyboolean hasMessageProperty(java.lang.String key)
key
- the key to be checked for existencejava.util.Map getMessageProperties()
boolean isRequest()
boolean isResponse()
java.lang.String getDestinationURL()
void setDestinationURL(java.lang.String destinationURL)
destinationURL
- the new destination URLjava.lang.String getContentType()
java.lang.String getRequestContentType()
void setContentType(java.lang.String contentType)
contentType
- the content type string to be setjava.lang.String getProxyServiceID()
void addResponseCorrelation(java.lang.String key, java.lang.Object value)
key
- correlation map keyvalue
- value to correlatejava.util.UUID getMessageUUID()
java.util.UUID getCorrelatedRequestUUID()
java.util.UUID getParentMessageUUID()
java.util.UUID getTransactionUUID()
Further to that, while the request and response messages of a single transaction in almost all the cases
will have different messageUUID
the transaction UUID will be the same.
org.springframework.transaction.TransactionStatus getTxnStatus()
void addMessageFileForRelease(MessageFile mf)
mf
- the MessageFile to be registered for removalvoid addMessageFormatForRelease(MessageFormat mf)
mf
- the payload to linkvoid addMessageForRelease(Message m)
m
- the Message to linkMessage cloneMessage()
Message createDefaultResponseMessage()
void addException(java.lang.Exception e)
e
- the Exceptionvoid addException(ErrorInfo e)
e
- the ErrorInfo with optional error code and messagejava.util.List getExceptions()
ErrorInfo getLastException()
void beginTransaction(java.lang.String transactionManagerBeanId)
void suspendTransaction(java.lang.String transactionManagerBeanId)
transactionManagerBeanId
- the Spring bean ID of the transaction managervoid resumeAndCommitTransaction()
void resumeTransaction()
void resumeAndRollbackTransaction()
void rollbackTransaction()
void commitTransaction()
void beginTransaction()
void suspendTransaction()
Mediation getMediation()
java.lang.String getOriginatingTransport()
java.lang.String getLastAddressValue()
java.lang.String getLastSentURL()
long getBaseTime()