Interface MatsTrace.Call<Z>

All Known Implementing Classes:
MatsTraceFieldImpl.CallImpl
Enclosing interface:
MatsTrace<Z>

public static interface MatsTrace.Call<Z>
Represents an entry in the MatsTrace.
  • 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

    • getReplyFromSpanId

      long getReplyFromSpanId()
      Returns:
      when getCallType() is REPLY, the value of the REQUEST's SpanId is returned, otherwise an IllegalStateException is thrown.
    • getFrom

      String getFrom()
      Returns:
      the stageId that sent this call - will most probably be the string "-nulled-" for any other Call than the MatsTrace.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

      Returns:
      the endpointId/stageId this Call concerns, wrapped in a MatsTrace.Call.Channel to also specify the MatsTrace.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 first REQUEST 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 with getReplyStackHeight() elements containing "-nulled-" for any other Call than the MatsTrace.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 a SEND, which means that you don't want a reply).