Package io.mats3.api.intercept
Interface MatsOutgoingMessage.MatsEditableOutgoingMessage
- All Superinterfaces:
MatsOutgoingMessage
- All Known Implementing Classes:
JmsMatsMessage
- Enclosing interface:
- MatsOutgoingMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.mats3.api.intercept.MatsOutgoingMessage
MatsOutgoingMessage.DispatchType, MatsOutgoingMessage.MatsEditableOutgoingMessage, MatsOutgoingMessage.MatsSentOutgoingMessage, MatsOutgoingMessage.MessageType
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add byte[] sideload to outgoing message.void
Add String sideload to outgoing message.void
setSameStackHeightExtraState
(String key, Object object) An interceptor might need to add state to an outgoing message which will be present on incoming message of the next stage of a multi-stage endpoint - i.e.void
setTraceProperty
(String propertyName, Object object) Set trace property.Methods inherited from interface io.mats3.api.intercept.MatsOutgoingMessage
getBytes, getBytesKeys, getData, getDispatchType, getFlowId, getFrom, getInitialTargetState, getInitiatingAppName, getInitiatingAppVersion, getInitiatorId, getMatsMessageId, getMessageType, getReplyTo, getSameStackHeightState, getString, getStringKeys, getTimeToLive, getTo, getTraceId, getTraceProperty, getTracePropertyKeys, isInteractive, isNoAudit, isNonPersistent, isReplyToSubscription, isToSubscription
-
Method Details
-
setTraceProperty
Set trace property. -
setSameStackHeightExtraState
An interceptor might need to add state to an outgoing message which will be present on incoming message of the next stage of a multi-stage endpoint - i.e. "extra state" in addition to the State class that the user has specified for the Endpoint. Only relevant forMatsOutgoingMessage.MessageType.REQUEST
,MatsOutgoingMessage.MessageType.NEXT
andMatsOutgoingMessage.MessageType.GOTO
- will throwIllegalStateException
otherwise. REQUEST: If extra-state is added to an outgoing REQUEST-message from ServiceA.stage1, it will be present again on the subsequent REPLY-message to ServiceA.stage2 (and any subsequent stages). NEXT: If extra-state is added to an outgoing NEXT-message from ServiceA.stage1, it will be present again on the subsequent incoming message to ServiceA.stage2 (and any subsequent stages). To add info to the receiving stage of a REQUEST, you may employaddBytes(String, byte[])
andaddString(String, String)
. Given that such extra-state would need support from the receiving endpoint too to make much sense (i.e. an installed interceptor reading and understanding the incoming extra state, typically the same interceptor installed there as the one adding the state), it could just pick up the side load and transfer it over to the extra state if that was desired. Therefore, even though it could be possible to add extra-state to the targeted/receiving endpoint, I've decided against it so far. The extra-state is available on the stage interception atMatsStageInterceptor.StageCommonContext.getIncomingSameStackHeightExtraState(String, Class)
. -
addBytes
Add byte[] sideload to outgoing message. -
addString
Add String sideload to outgoing message.
-