Interface ProcessTraceEvent

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    ProcessTraceEvent_impl

    public interface ProcessTraceEvent
    extends java.io.Serializable
    Captures information, including timing, about an event that occurred during processing. Events may have sub-events that further break down the steps involved in a complex process.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ANALYSIS
      Constant for the ANALYSIS event type.
      static java.lang.String ANALYSIS_ENGINE
      Constant for the ANALYSIS_ENGINE event type.
      static java.lang.String SERVICE
      Constant for the SERVICE event type.
      static java.lang.String SERVICE_CALL
      Constant for the SERVICE_CALL event type.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getComponentName()
      Retrieves the name of the component that is performing this event.
      java.lang.String getDescription()
      Retrieves the description of this event.
      int getDuration()
      Gets the duration of this event.
      int getDurationExcludingSubEvents()
      Gets the duration of this event, minus the sum of the durations of its direct sub-events.
      java.lang.String getResultMessage()
      Retrieves the result message of this event.
      java.util.List<ProcessTraceEvent> getSubEvents()
      Gets the sub-events of this event.
      java.lang.String getType()
      Gets the type of event.
      java.lang.String toString()
      Generates a user-readable representation of this event and its sub-events.
      void toString​(java.lang.StringBuffer aBuf, int aIndentLevel)
      Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.
      void toString​(java.lang.StringBuffer aBuf, int aIndentLevel, int aTotalTime)
      Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.
    • Field Detail

      • ANALYSIS_ENGINE

        static final java.lang.String ANALYSIS_ENGINE
        Constant for the ANALYSIS_ENGINE event type. This represents the time spent in the Analysis Engine, including the annotator's analysis and framework overhead.
        See Also:
        Constant Field Values
      • ANALYSIS

        static final java.lang.String ANALYSIS
        Constant for the ANALYSIS event type. This represents the actual analysis performed by an annotator.
        See Also:
        Constant Field Values
      • SERVICE

        static final java.lang.String SERVICE
        Constant for the SERVICE event type. This represents the total time spent in execution of a remote service (not including communication and marshalling/unmarshalling overhead).
        See Also:
        Constant Field Values
      • SERVICE_CALL

        static final java.lang.String SERVICE_CALL
        Constant for the SERVICE_CALL event type. This represents the total time spent making a call on a remote service, including marshalling and unmarshalling.
        See Also:
        Constant Field Values
    • Method Detail

      • getComponentName

        java.lang.String getComponentName()
        Retrieves the name of the component that is performing this event.
        Returns:
        the component name
      • getType

        java.lang.String getType()
        Gets the type of event. Standard values for this property are defined as constants on this interface, but any String is allowed.
        Returns:
        the event type
      • getDescription

        java.lang.String getDescription()
        Retrieves the description of this event.
        Returns:
        the event Description
      • getDuration

        int getDuration()
        Gets the duration of this event.
        Returns:
        the duration of this event, in milliseconds.
      • getResultMessage

        java.lang.String getResultMessage()
        Retrieves the result message of this event.
        Returns:
        the event's result message
      • getSubEvents

        java.util.List<ProcessTraceEvent> getSubEvents()
        Gets the sub-events of this event.
        Returns:
        a List containing other ProcessTraceEvent objects
      • getDurationExcludingSubEvents

        int getDurationExcludingSubEvents()
        Gets the duration of this event, minus the sum of the durations of its direct sub-events.
        Returns:
        the duration of this event in milliseconds, excluding the time spent in its sub-events
      • toString

        java.lang.String toString()
        Generates a user-readable representation of this event and its sub-events.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of this event and its sub-events
      • toString

        void toString​(java.lang.StringBuffer aBuf,
                      int aIndentLevel)
        Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. This is useful for writing nested events.
        Parameters:
        aBuf - string buffer to add to
        aIndentLevel - indentation level
      • toString

        void toString​(java.lang.StringBuffer aBuf,
                      int aIndentLevel,
                      int aTotalTime)
        Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. Also, if the total time for all events is known, this method will print the percentage of time used by this event and its subevents.
        Parameters:
        aBuf - string buffer to add to
        aIndentLevel - indentation level
        aTotalTime - total time, used to calculate percentags. If not known, pass 0.