Modifier and Type | Field and Description |
---|---|
static Trail |
NULL_TRAIL |
static long |
UNREPORTABLE_TRAIL |
Modifier and Type | Method and Description |
---|---|
void |
associate(Trail otherTrail,
Scope scope)
Send a trail association message or correlation marker, depending on whether this trail and the given trail are on the same SAS server or not.
|
void |
end()
End this trail.
|
EventMessage |
event(Enum<? extends SasEventEnum> event)
Create an event message with given event.
|
void |
flush()
Write reported events and markers for this trail to permanent storage on the SAS server.
|
long |
id() |
boolean |
isEnabled()
Check if reporting is enabled.
|
MarkerMessage |
marker(int markerId)
Create a marker message with given marker ID.
|
MarkerMessage |
marker(Markers marker)
Create a marker message with given marker.
|
void |
report(Enum<? extends SasEventEnum> event)
Build and report an event with no parameters
|
void |
report(EventMessage event)
Report an event created with
Trail.event(Enum) |
void |
report(MarkerMessage marker)
Report a marker created with
Trail.marker(Markers) or Trail.marker(int) |
void |
report(MarkerMessage marker0,
MarkerMessage marker1)
Report markers created with
Trail.marker(Markers) or Trail.marker(int) |
void |
report(MarkerMessage marker0,
MarkerMessage marker1,
MarkerMessage marker2)
Report markers created with
Trail.marker(Markers) or Trail.marker(int) |
void |
report(Markers marker)
Build and report a marker with no parameters
|
UUID |
steeringId() |
public static final Trail NULL_TRAIL
public static final long UNREPORTABLE_TRAIL
public long id()
public UUID steeringId()
steeringId
in interface Trail
public boolean isEnabled()
Trail
Check if reporting is enabled.
public EventMessage event(Enum<? extends SasEventEnum> event)
Trail
Create an event message with given event.
public MarkerMessage marker(Markers marker)
Trail
Create a marker message with given marker.
public MarkerMessage marker(int markerId)
Trail
Create a marker message with given marker ID.
This method should not be used unless new Markers have been added to SAS that are not available in the Markers
enum.
public void associate(Trail otherTrail, Scope scope)
Trail
Send a trail association message or correlation marker, depending on whether this trail and the given trail are on the same SAS server or not.
With a SAS federation, it is possible that a pair of trails may not be reporting to the same SAS server. In this case this method will send a generic correlation marker using a UUID v4 (random) identifier to both SAS servers.
public void report(EventMessage event)
Trail
Report an event created with Trail.event(Enum)
public void report(MarkerMessage marker)
Trail
Report a marker created with Trail.marker(Markers)
or Trail.marker(int)
public void report(MarkerMessage marker0, MarkerMessage marker1)
Trail
Report markers created with Trail.marker(Markers)
or Trail.marker(int)
public void report(MarkerMessage marker0, MarkerMessage marker1, MarkerMessage marker2)
Trail
Report markers created with Trail.marker(Markers)
or Trail.marker(int)
public void report(Markers marker)
Trail
Build and report a marker with no parameters
public void report(Enum<? extends SasEventEnum> event)
Trail
Build and report an event with no parameters
public void end()
Trail
End this trail.
Sends an Markers.END_MARKER
to denote the end of the user experience.
Trails must be ended to be searchable in SAS.
It is better to call end() twice than never.
Events received within 5s of an end marker being sent are associated with the same trail but trail-trail association can no longer occur.
public void flush()
Trail
Write reported events and markers for this trail to permanent storage on the SAS server.
Sends an Markers.FLUSH_MARKER
to denote a break in control of the dialog.
Flushing a trail should be performed at the end of an active control phase where a delay is anticipated before the next dialog event.