Interface Data

  • All Known Implementing Classes:
    AbstractData, ActionData, CustomData, CustomValue, EventData, PageLoadTimingData, RequestData, TimerData, TransactionData

    public interface Data

    The Data interface defines the minimum functionality any data record must implement to be recordable by the XLT engine. Typically, the XLT engine already collects sufficient data (e.g. error and run time values). However, it may be necessary to log other important values as well. For this, a new data record type needs to be created, either by implementing this interface or - preferably - by extending from one of the already existing data record types.

    Such a data record class must obey the following rules:

    • it must have a name
    • it must have a time stamp
    • it must be serializable to a comma-separated list of values
    • it must be able to reconstruct its state from a comma-separated list of values
    • in order to tell one type of data record from the other, the first entry in the value list must be a type code (e.g. "MyRecordType" or simple "M")

    Note that the type codes "A", "C", "E", "J", "R", and "T" are already used by the XLT engine.

    The data record can be logged using the DataManager.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char DELIMITER
      The delimiter character (a comma) used to separate single values in a data record.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void fromCSV​(java.lang.String s)
      Recreates the state of this object from a list of values separated by the DELIMITER constant.
      java.lang.String getAgentName()
      Returns the name of the agent that produced this data record.
      java.lang.String getName()
      Returns the name of this data record.
      long getTime()
      Returns the time when the event occurred that this data record was created for.
      java.lang.String getTransactionName()
      Returns the name of the transaction that produced this data record.
      java.lang.String getTypeCode()
      Returns the type code of this data record.
      void setAgentName​(java.lang.String agentName)
      Sets the name of the agent that produced this data record.
      void setName​(java.lang.String name)
      Sets the name of this data record.
      void setTime()
      Sets the time when this record's event occurred to the current time.
      void setTime​(long time)
      Sets the time when this record's event occurred.
      void setTransactionName​(java.lang.String transactionName)
      Sets the name of the transaction that produced this data record.
      java.lang.String toCSV()
      Returns the state of this object as a list of values separated by the DELIMITER constant.
    • Field Detail

      • DELIMITER

        static final char DELIMITER
        The delimiter character (a comma) used to separate single values in a data record.
        See Also:
        Constant Field Values
    • Method Detail

      • fromCSV

        void fromCSV​(java.lang.String s)
        Recreates the state of this object from a list of values separated by the DELIMITER constant.
        Parameters:
        s - the list of values
      • getAgentName

        java.lang.String getAgentName()
        Returns the name of the agent that produced this data record. Only used during report generation or analysis.
        Returns:
        the agent's name
      • getName

        java.lang.String getName()
        Returns the name of this data record.
        Returns:
        the name
      • getTime

        long getTime()
        Returns the time when the event occurred that this data record was created for.
        Returns:
        the time
      • getTransactionName

        java.lang.String getTransactionName()
        Returns the name of the transaction that produced this data record. Only used during report generation or analysis.
        Returns:
        the transaction's name
      • getTypeCode

        java.lang.String getTypeCode()
        Returns the type code of this data record.
        Returns:
        the type code
      • setAgentName

        void setAgentName​(java.lang.String agentName)
        Sets the name of the agent that produced this data record. Only used during report generation or analysis.
        Parameters:
        agentName - the agent's name
      • setName

        void setName​(java.lang.String name)
        Sets the name of this data record.
        Parameters:
        name - the name
      • setTime

        void setTime()
        Sets the time when this record's event occurred to the current time.
      • setTime

        void setTime​(long time)
        Sets the time when this record's event occurred.
        Parameters:
        time - the timestamp
      • setTransactionName

        void setTransactionName​(java.lang.String transactionName)
        Sets the name of the transaction that produced this data record. Only used during report generation or analysis.
        Parameters:
        transactionName - the transaction's name
      • toCSV

        java.lang.String toCSV()
        Returns the state of this object as a list of values separated by the DELIMITER constant.
        Returns:
        the list of values