Class EventData
- java.lang.Object
-
- com.xceptance.xlt.api.engine.AbstractData
-
- com.xceptance.xlt.api.engine.EventData
-
- All Implemented Interfaces:
Data
public class EventData extends AbstractData
The
EventData
class is used to record information about arbitrary "events" that may occur during a test run. These events can be used to indicate that the test has encountered a special situation, which is not an error (which would abort the test run), but is too important to ignore or to write to the log only. Events recorded this way are evaluated during report generation, and a summary of the events occurred during a test run appears in the test report.Typically,
EventData
objects are created by custom code only, since the framework has no notion about "special situations". The statistics name inherited from the parent class can be used to indicate the type of event. Additionally, anEventData
object carries a message string describing the event in some greater detail. As with all statistics,EventData
objects can be recorded via theDataManager
.Note that
EventData
objects have an "E" as their type code.- See Also:
ActionData
,CustomData
,RequestData
,TransactionData
,DataManager
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
Returns the message associated with this event.java.lang.String
getTestCaseName()
Returns the name of the test case that generated this event.void
setMessage(java.lang.String message)
Sets the message associated with this event.void
setRemainingValues(java.util.List<XltCharBuffer> values)
Called by XLT during report creation to recreate the remaining object state from the passed string list.void
setTestCaseName(java.lang.String testCaseName)
Sets the name of the test case that generated this event.java.util.List<java.lang.String>
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 com.xceptance.xlt.api.engine.AbstractData
getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setAllValues, setBaseValues, setName, setTime, setTransactionName
-
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns the message associated with this event.- Returns:
- the message
-
getTestCaseName
public java.lang.String getTestCaseName()
Returns the name of the test case that generated this event.- Returns:
- the test case name
-
setMessage
public void setMessage(java.lang.String message)
Sets the message associated with this event.- Parameters:
message
- the message to set
-
setTestCaseName
public void setTestCaseName(java.lang.String testCaseName)
Sets the name of the test case that generated this event.- Parameters:
testCaseName
- the test case name
-
toList
public java.util.List<java.lang.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 interfaceData
- Overrides:
toList
in classAbstractData
- Returns:
- the list of values that form the state of this object
- See Also:
Data.setBaseValues(List)
,Data.setRemainingValues(List)
-
setRemainingValues
public void setRemainingValues(java.util.List<XltCharBuffer> values)
Called by XLT during report creation to recreate the remaining object state from the passed string list. The base values have already been initialized by callingData.setBaseValues(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.- Parameters:
values
- the string list to recreate the object state from- See Also:
Data.setBaseValues(List)
,Data.toList()
-
-