Package io.mats3.serial
Interface MatsTrace.Call<Z>
-
- All Known Implementing Classes:
MatsTraceFieldImpl.CallImpl
public static interface MatsTrace.Call<Z>Represents an entry in theMatsTrace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMatsTrace.Call.CallTypeWhich type of Call this is.static interfaceMatsTrace.Call.ChannelAn encapsulation of the stageId/endpointId along with theMatsTrace.Call.MessagingModelthe message should be delivered over.static classMatsTrace.Call.MessagingModelSpecifies what type of Messaging Model a 'to' and 'replyTo' is to go over: Queue or Topic.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCalledTimestamp()java.lang.StringgetCallingAppName()java.lang.StringgetCallingAppVersion()java.lang.StringgetCallingHost()MatsTrace.Call.CallTypegetCallType()ZgetData()java.lang.StringgetDebugInfo()java.lang.StringgetFrom()java.lang.StringgetMatsMessageId()longgetReplyFromSpanId()java.util.List<MatsTrace.Call.Channel>getReplyStack()intgetReplyStackHeight()MatsTrace.Call.ChannelgetTo()MatsTrace.Call<Z>setDebugInfo(java.lang.String callingAppName, java.lang.String callingAppVersion, java.lang.String callingHost, java.lang.String debugInfo)Can only be set once.
-
-
-
Method Detail
-
getCalledTimestamp
long getCalledTimestamp()
-
getMatsMessageId
java.lang.String getMatsMessageId()
- Returns:
- the Mats Message Id, a guaranteed-globally-unique id for this particular message - it SHALL be
constructed as follows:
MatsTrace.getFlowId()+ "_" + flow-unique messageId.
-
setDebugInfo
MatsTrace.Call<Z> setDebugInfo(java.lang.String callingAppName, java.lang.String callingAppVersion, java.lang.String callingHost, java.lang.String debugInfo)
Can only be set once.
-
getCallingAppName
java.lang.String getCallingAppName()
-
getCallingAppVersion
java.lang.String getCallingAppVersion()
-
getCallingHost
java.lang.String getCallingHost()
-
getDebugInfo
java.lang.String getDebugInfo()
-
getCallType
MatsTrace.Call.CallType getCallType()
-
getReplyFromSpanId
long getReplyFromSpanId()
- Returns:
- when
getCallType()isREPLY, the value of the REQUEST's SpanId is returned, otherwise anIllegalStateExceptionis thrown.
-
getFrom
java.lang.String getFrom()
- Returns:
- the stageId that sent this call - will most probably be the string
"-nulled-"for any other Call than theMatsTrace.getCurrentCall(), to conserve space in the MatsTrace. The rationale for this, is that if those Calls are available, they are there for debug purposes only, and then you can use the order of the Calls to see who is the caller: The previous Call's"to"is the"from"of this Call.
-
getTo
MatsTrace.Call.Channel getTo()
- Returns:
- the endpointId/stageId this Call concerns, wrapped in a
MatsTrace.Call.Channelto also specify theMatsTrace.Call.MessagingModelin use.
-
getData
Z getData()
-
getReplyStackHeight
int getReplyStackHeight()
- Returns:
- the stack height of this Call - which is the number of elements below this call. I.e. for a
REPLYto a Terminator, the stack is of size 0 (there are no more elements to REPLY to), while for the firstREQUESTfrom an initiator, the stack is of size 1 (the endpointId for the Terminator is the one element below this Call).
-
getReplyStack
java.util.List<MatsTrace.Call.Channel> getReplyStack()
- Returns:
- a COPY of the replyTo stack of Channels (if you just need the height, which is the common case, use
getReplyStackHeight()) - NOTICE: This will most probably be a List withgetReplyStackHeight()elements containing "-nulled-" for any other Call than theMatsTrace.getCurrentCall(), to conserve space in the MatsTrace. The LAST (i.e. position 'size()-1') element is the most recent, meaning that the next REPLY will go here, while the FIRST (i.e. position 0) element is the earliest in the stack, i.e. the stageId where the Terminator endpointId typically will reside (unless the initial call was aSEND, which means that you don't want a reply).
-
-