Package com.xceptance.xlt.api.engine
Class AbstractData
java.lang.Object
com.xceptance.xlt.api.engine.AbstractData
- All Implemented Interfaces:
Data
- Direct Known Subclasses:
CustomValue
,EventData
,TimerData
,WebVitalData
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
ConstructorsConstructorDescriptionAbstractData
(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 TypeMethodDescriptionReturns the name of the agent that produced this data record.getName()
Returns the name of this data record.long
getTime()
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
setAllValues
(List<XltCharBuffer> values) Recreates the full object state at once.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.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.toList()
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
Creates a new AbstractData object and gives it the specified name and type code.- Parameters:
name
- the request nametypeCode
- 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
Recreates the full object state at once. Mainly for testing.- Parameters:
values
- the string list to recreate the object state from
-
setBaseValues
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 callingData.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 interfaceData
- Parameters:
values
- the string list to recreate the object state from- See Also:
-
getAgentName
Returns the name of the agent that produced this data record. Only used during report generation or analysis.- Specified by:
getAgentName
in interfaceData
- Returns:
- the agent's name
-
getName
Returns the name of this data record. -
getTime
public long getTime()Returns the time when the event occurred that this data record was created for. -
getTransactionName
Returns the name of the transaction that produced this data record. Only used during report generation or analysis.- Specified by:
getTransactionName
in interfaceData
- Returns:
- the transaction's name
-
getTypeCode
public char getTypeCode()Returns the type code of this data record.- Specified by:
getTypeCode
in interfaceData
- Returns:
- the type code
-
setAgentName
Sets the name of the agent that produced this data record. Only used during report generation or analysis.- Specified by:
setAgentName
in interfaceData
- Parameters:
agentName
- the agent's name
-
setName
Sets the name of this data record. -
setTime
public void setTime(long time) Sets the time when this record's event occurred. To obtain the timestamp, please useGlobalClock.millis()
. -
setTransactionName
Sets the name of the transaction that produced this data record. Only used during report generation or analysis.- Specified by:
setTransactionName
in interfaceData
- Parameters:
transactionName
- the transaction's name
-
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.
-