public interface Message
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(String key,
MessageFormat att)
Add an attachment to the message identified by the specified key
|
void |
addAttachmentFromFile(String key,
File att)
Add a file as an attachment to the message identified by the specified key
|
void |
addException(ErrorInfo e)
Attach an error that this message encountered
|
void |
addException(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(String key,
Object value)
Add a message property - i.e.
|
void |
addResponseCorrelation(String key,
Object value)
Add an entry for correlation into the response message for this message.
|
void |
addTransportHeader(String key,
String value)
Add a transport header to this message
|
void |
beginProcessing(String id) |
void |
beginTransaction()
Begin a transaction using the default (i.e.
|
void |
beginTransaction(String transactionManagerBeanId)
Begin a new Spring transaction and associate its context with this message
|
Message |
cloneMessage()
Clone the current message with transport headers and without properties or payload.
|
Message |
cloneMessageAsChild()
Creates a clone of the current message as the child of that message - without transport headers 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
|
Message |
createDefaultResponseMessageAsChild()
Create the default response message to this message and attached it as a child of the current message
|
MessageFormat |
detachPayload()
Detach the current payload from this message.
|
long |
endProcessing(String id) |
MessageFormat |
getAttachment(String key)
Get the attachment with the given key
|
Map<String,MessageFormat> |
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.
|
String |
getContentType()
Get the content type of the message if set.
|
UUID |
getCorrelatedRequestUUID()
The request message UUID for a response message
|
MessageFormat |
getCurrentPayload()
Get the current payload of the message
|
String |
getDestinationURL()
Get the current destination URL for this message.
|
Map<String,List<String>> |
getDuplicateTransportHeaders()
Get the map of current transport header duplicate values
|
ESMessageStatistics |
getESStatistics() |
List<ErrorInfo> |
getExceptions()
Get a list of errors this message encountered
|
String |
getFirstTransportHeader(String key)
Get the first transport header with the given key
|
String |
getFirstTransportHeaderIgnoreCase(String key)
This will perform a case insensitive lookup for the first occurrence of the given transport header
|
String |
getLastAddressValue()
Return the address value (e.g.
|
ErrorInfo |
getLastException()
Get the last error encountered and linked to this message
|
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
|
Map<String,Object> |
getMessageProperties()
Return current message properties as an unmodifiable map
|
Object |
getMessageProperty(String key)
Get the message property associated with the specified key
|
<T> T |
getMessageProperty(String key,
Class<T> cls)
Get the message property associated with the specified key as a typed object of type T
|
UUID |
getMessageUUID()
Get the UUID of the message
|
MessageFormat |
getOriginalPayload()
The original payload of the message - as received from the transport, unless modified
|
String |
getOriginatingTransport()
Get originating transport
|
UUID |
getParentMessageUUID()
The parent message UUID
|
String |
getProxyServiceID()
Get the id of the proxy service to which this message belongs
|
String |
getRequestContentType()
Return the content type of the original request.
|
MessageStatistics |
getStatistics() |
String |
getStringMessageProperty(String key)
Get the String message property associated with the specified key
|
int |
getTraceID()
Increment and get the traceID atomic integer.
|
UUID |
getTransactionUUID()
The UUID that uniquely identifies a single transaction.
|
Map<String,String> |
getTransportHeaders()
Get the map of current transport header values ignoring duplicates
|
List<String> |
getTransportHeaders(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(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 |
removeMessageFileFromRelease(MessageFile mf)
Remove a MessageFile (a temporary file) from the messageFilesToRelease list
|
void |
removeMessageFormatForRelease(MessageFormat mf)
Remove a associate a MessageFile (a temporary file) for release from the list of message format instances to release
|
void |
removeMessageFormatInstancesFromRelease(MessageFormat mf)
Remove a MessageFormat (i.e.
|
void |
removeMessageProperty(String key)
Remove the message property associated with the specified key
|
void |
removeTransportHeader(String key)
Remove all occurrences of the specified transport header
|
void |
removeTransportHeaders(String... headers)
Remove transport headers specified in the comma separated list
|
void |
replaceTransportHeader(String key,
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(String... headers)
Retain only transport headers specified in the comma separated list
|
void |
rollbackTransaction()
Invoked to request a rollback of the current transaction
|
void |
setContentType(String contentType)
Set the content type of the message
|
void |
setCurrentPayload(MessageFormat currentPayload)
Set the current payload of the message
|
void |
setDestinationURL(String destinationURL)
Set the destination URL for this message
|
void |
setMarkedAsFailed(boolean markedAsFailed)
Mark this message as failed, by passing true.
|
void |
setStatistics(MessageStatistics messageStatistics) |
void |
suspendTransaction()
Suspend a transaction using the default (i.e.
|
void |
suspendTransaction(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(String key, MessageFormat att)
key
- the identification key for the attachmentatt
- the attachment payloadvoid addAttachmentFromFile(String key, File att)
key
- the identification key for the attachmentatt
- the attachment payload as a fileMessageFormat getAttachment(String key)
key
- the identifier of the attachmentboolean containsAttachments()
Map<String,MessageFormat> getAttachments()
MessageFormat getOriginalPayload()
MessageFormat detachPayload()
String getFirstTransportHeader(String key)
key
- the header nameString getFirstTransportHeaderIgnoreCase(String key)
key
- the case insensitive header namevoid addTransportHeader(String key, String value)
key
- header namevalue
- header valuevoid removeTransportHeader(String key)
key
- header name to removevoid removeAllTransportHeaders()
void removeTransportHeaders(String... headers)
headers
- a list of transport headers to removevoid retainOnlyTransportHeaders(String... headers)
headers
- a list of transport headers to retainvoid replaceTransportHeader(String key, String value)
key
- the header namevalue
- the new valueList<String> getTransportHeaders(String key)
Map<String,String> getTransportHeaders()
Map<String,List<String>> getDuplicateTransportHeaders()
void addMessageProperty(String key, Object value)
key
- property keyvalue
- property valueObject getMessageProperty(String key)
key
- property key<T> T getMessageProperty(String key, Class<T> cls)
T
- the type of the propertykey
- the property keycls
- the class of the property typeString getStringMessageProperty(String key)
key
- property keyvoid removeMessageProperty(String key)
key
- property keyboolean hasMessageProperty(String key)
key
- the key to be checked for existenceMap<String,Object> getMessageProperties()
boolean isRequest()
boolean isResponse()
String getDestinationURL()
void setDestinationURL(String destinationURL)
destinationURL
- the new destination URLString getContentType()
String getRequestContentType()
void setContentType(String contentType)
contentType
- the content type string to be setString getProxyServiceID()
void addResponseCorrelation(String key, Object value)
key
- correlation map keyvalue
- value to correlateUUID getMessageUUID()
UUID getCorrelatedRequestUUID()
UUID getParentMessageUUID()
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 removeMessageFileFromRelease(MessageFile mf)
mf
- the MessageFile which has been registered for removalvoid removeMessageFormatForRelease(MessageFormat mf)
mf
- the MessageFile to be removed from the list of message format instances to releasevoid addMessageFormatForRelease(MessageFormat mf)
mf
- the payload to linkvoid removeMessageFormatInstancesFromRelease(MessageFormat mf)
mf
- the MessageFile which has been registered for removalvoid addMessageForRelease(Message m)
m
- the Message to linkMessage cloneMessage()
Message cloneMessageAsChild()
Message createDefaultResponseMessage()
Message createDefaultResponseMessageAsChild()
void addException(Exception e)
e
- the Exceptionvoid addException(ErrorInfo e)
e
- the ErrorInfo with optional error code and messageList<ErrorInfo> getExceptions()
ErrorInfo getLastException()
void beginTransaction(String transactionManagerBeanId)
void suspendTransaction(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()
String getOriginatingTransport()
String getLastAddressValue()
String getLastSentURL()
long getBaseTime()
void setStatistics(MessageStatistics messageStatistics)
MessageStatistics getStatistics()
ESMessageStatistics getESStatistics()
int getTraceID()
void beginProcessing(String id)
long endProcessing(String id)
Copyright © 2010–2016 AdroitLogic. All rights reserved.