Package io.mats3.serial
Interface MatsTrace.Call<Z>
- All Known Implementing Classes:
MatsTraceFieldImpl.CallImpl
public static interface MatsTrace.Call<Z>
Represents an entry in the
MatsTrace
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Which type of Call this is.static interface
An encapsulation of the stageId/endpointId along with theMatsTrace.Call.MessagingModel
the message should be delivered over.static enum
Specifies what type of Messaging Model a 'to' and 'replyTo' is to go over: Queue or Topic. -
Method Summary
-
Method Details
-
getCalledTimestamp
long getCalledTimestamp() -
getMatsMessageId
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(String callingAppName, String callingAppVersion, String callingHost, String debugInfo) Can only be set once. -
getCallingAppName
String getCallingAppName() -
getCallingAppVersion
String getCallingAppVersion() -
getCallingHost
String getCallingHost() -
getDebugInfo
String getDebugInfo() -
getCallType
MatsTrace.Call.CallType getCallType() -
getReplyFromSpanId
long getReplyFromSpanId()- Returns:
- when
getCallType()
isREPLY
, the value of the REQUEST's SpanId is returned, otherwise anIllegalStateException
is thrown.
-
getFrom
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.Channel
to also specify theMatsTrace.Call.MessagingModel
in 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
REPLY
to a Terminator, the stack is of size 0 (there are no more elements to REPLY to), while for the firstREQUEST
from an initiator, the stack is of size 1 (the endpointId for the Terminator is the one element below this Call).
-
getReplyStack
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).
-