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
public abstract class AbstractData extends java.lang.Object implements Data
TheAbstractDataclass may be the super class of a special data record class.
-
-
Constructor Summary
Constructors Constructor Description AbstractData(java.lang.String typeCode)Creates a new AbstractData object and gives it the specified type code.AbstractData(java.lang.String name, java.lang.String typeCode)Creates a new AbstractData object and gives it the specified name and type code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>addValues()Builds a list of string values that represents the state of this object.voidfromCSV(java.lang.String s)Recreates the state of this object from a list of values separated by the DELIMITER constant.java.lang.StringgetAgentName()Returns the name of the agent that produced this data record.protected intgetMinNoCSVElements()Returns the minimum number of elements in the CSV string.java.lang.StringgetName()Returns the name of this data record.longgetTime()Returns the time when the event occurred that this data record was created for.java.lang.StringgetTransactionName()Returns the name of the transaction that produced this data record.java.lang.StringgetTypeCode()Returns the type code of this data record.protected voidparseValues(java.lang.String[] values)Recreates the state of this object from an array of string values.voidsetAgentName(java.lang.String agentName)Sets the name of the agent that produced this data record.voidsetName(java.lang.String name)Sets the name of this data record.voidsetTime()Sets the time when this record's event occurred to the current time.voidsetTime(long time)Sets the time when this record's event occurred.voidsetTransactionName(java.lang.String transactionName)Sets the name of the transaction that produced this data record.java.lang.StringtoCSV()Returns the state of this object as a list of values separated by the DELIMITER constant.
-
-
-
Constructor Detail
-
AbstractData
public AbstractData(java.lang.String typeCode)
Creates a new AbstractData object and gives it the specified type code.- Parameters:
typeCode- the type code
-
AbstractData
public AbstractData(java.lang.String name, java.lang.String typeCode)Creates a new AbstractData object and gives it the specified name and type code.- Parameters:
name- the request nametypeCode- the type code
-
-
Method Detail
-
fromCSV
public final void fromCSV(java.lang.String s)
Recreates the state of this object from a list of values separated by the DELIMITER constant.
-
getAgentName
public java.lang.String getAgentName()
Returns the name of the agent that produced this data record. Only used during report generation or analysis.- Specified by:
getAgentNamein interfaceData- Returns:
- the agent's name
-
getName
public java.lang.String 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
public java.lang.String getTransactionName()
Returns the name of the transaction that produced this data record. Only used during report generation or analysis.- Specified by:
getTransactionNamein interfaceData- Returns:
- the transaction's name
-
getTypeCode
public java.lang.String getTypeCode()
Returns the type code of this data record.- Specified by:
getTypeCodein interfaceData- Returns:
- the type code
-
setAgentName
public void setAgentName(java.lang.String agentName)
Sets the name of the agent that produced this data record. Only used during report generation or analysis.- Specified by:
setAgentNamein interfaceData- Parameters:
agentName- the agent's name
-
setName
public void setName(java.lang.String name)
Sets the name of this data record.
-
setTime
public void setTime()
Sets the time when this record's event occurred to the current time.
-
setTime
public void setTime(long time)
Sets the time when this record's event occurred.
-
setTransactionName
public void setTransactionName(java.lang.String transactionName)
Sets the name of the transaction that produced this data record. Only used during report generation or analysis.- Specified by:
setTransactionNamein interfaceData- Parameters:
transactionName- the transaction's name
-
toCSV
public final java.lang.String toCSV()
Returns the state of this object as a list of values separated by the DELIMITER constant.
-
addValues
protected java.util.List<java.lang.String> addValues()
Builds a list of string values that represents the state of this object. Override this method in sub classes to add custom values and use the list created by the super class.- Returns:
- the list of values
-
getMinNoCSVElements
protected int getMinNoCSVElements()
Returns the minimum number of elements in the CSV string.- Returns:
- minimum number of elements in the CSV string
-
parseValues
protected void parseValues(java.lang.String[] values)
Recreates the state of this object from an array of string values. Override this method in sub classes to restore custom values, but do not forget to call the super class first.- Parameters:
values- the list of values, must have at least the lengthgetMinNoCSVElements()
-
-