Class AbstractData

java.lang.Object
com.xceptance.xlt.api.engine.AbstractData
All Implemented Interfaces:
Data
Direct Known Subclasses:
CustomValue, EventData, TimerData, WebVitalData

public abstract class AbstractData extends Object implements Data
The AbstractData class may be the super class of a special data record class.

Import change in 7.0: We are not longer automatically capturing the start time when this object is created for performance reasons. You have to set the time explicitly.

  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractData(char typeCode)
    Creates a new AbstractData object and gives it the specified type code.
    AbstractData(String name, char typeCode)
    Creates a new AbstractData object and gives it the specified name and type code.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the agent that produced this data record.
    Returns the name of this data record.
    long
    Returns the time when the event occurred that this data record was created for.
    Returns the name of the transaction that produced this data record.
    char
    Returns the type code of this data record.
    void
    setAgentName(String agentName)
    Sets the name of the agent that produced this data record.
    final void
    Recreates the full object state at once.
    void
    Called by XLT during report creation to recreate the base object state (type code, name, and timestamp) from the passed string list.
    void
    Sets the name of this data record.
    void
    setTime(long time)
    Sets the time when this record's event occurred.
    void
    setTransactionName(String transactionName)
    Sets the name of the transaction that produced this data record.
    Called by XLT during a load test to return the full state of the object as a list of strings.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.xceptance.xlt.api.engine.Data

    setRemainingValues
  • Constructor Details

    • AbstractData

      public AbstractData(String name, char typeCode)
      Creates a new AbstractData object and gives it the specified name and type code.
      Parameters:
      name - the request name
      typeCode - the type code
    • AbstractData

      public AbstractData(char typeCode)
      Creates a new AbstractData object and gives it the specified type code.
      Parameters:
      typeCode - the type code
  • Method Details

    • setAllValues

      public final void setAllValues(List<XltCharBuffer> values)
      Recreates the full object state at once. Mainly for testing.
      Parameters:
      values - the string list to recreate the object state from
    • setBaseValues

      public void setBaseValues(List<XltCharBuffer> values)
      Called by XLT during report creation to recreate the base object state (type code, name, and timestamp) from the passed string list. The remaining values may later be initialized by calling Data.setRemainingValues(List) with the same list of values. Splitting the process of recreating the full object state into two methods is purely for performance reasons as the second step is not always needed.
      Specified by:
      setBaseValues in interface Data
      Parameters:
      values - the string list to recreate the object state from
      See Also:
    • getAgentName

      public String getAgentName()
      Returns the name of the agent that produced this data record. Only used during report generation or analysis.
      Specified by:
      getAgentName in interface Data
      Returns:
      the agent's name
    • getName

      public String getName()
      Returns the name of this data record.
      Specified by:
      getName in interface Data
      Returns:
      the name
    • getTime

      public long getTime()
      Returns the time when the event occurred that this data record was created for.
      Specified by:
      getTime in interface Data
      Returns:
      the time
    • getTransactionName

      public String getTransactionName()
      Returns the name of the transaction that produced this data record. Only used during report generation or analysis.
      Specified by:
      getTransactionName in interface Data
      Returns:
      the transaction's name
    • getTypeCode

      public char getTypeCode()
      Returns the type code of this data record.
      Specified by:
      getTypeCode in interface Data
      Returns:
      the type code
    • setAgentName

      public void setAgentName(String agentName)
      Sets the name of the agent that produced this data record. Only used during report generation or analysis.
      Specified by:
      setAgentName in interface Data
      Parameters:
      agentName - the agent's name
    • setName

      public void setName(String name)
      Sets the name of this data record.
      Specified by:
      setName in interface Data
      Parameters:
      name - the name
    • setTime

      public void setTime(long time)
      Sets the time when this record's event occurred. To obtain the timestamp, please use GlobalClock.millis().
      Specified by:
      setTime in interface Data
      Parameters:
      time - the timestamp
    • setTransactionName

      public void setTransactionName(String transactionName)
      Sets the name of the transaction that produced this data record. Only used during report generation or analysis.
      Specified by:
      setTransactionName in interface Data
      Parameters:
      transactionName - the transaction's name
    • toList

      public List<String> toList()
      Called by XLT during a load test to return the full state of the object as a list of strings. The first three entries have to be, in this order, the type code, the name, and the timestamp. All remaining entries and their order are specific to the concrete implementation class.

      Override this method in sub classes by calling the super method and adding custom values to the list it returns.

      Specified by:
      toList in interface Data
      Returns:
      the list of values that form the state of this object
      See Also: