Interface Trail
-
- All Known Implementing Classes:
NullTrailImpl
public interface TrailThe primary interface for creating and reporting markers and events. A trail is a sequence of related events and markers representing the processing sequence for a dialog or transaction.
- Since:
- Rhino 2.6.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassociate(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.voidend()End this trail.EventMessageevent(Enum<? extends SasEventEnum> event)Create an event message with given event.voidflush()Write reported events and markers for this trail to permanent storage on the SAS server.booleanisEnabled()Check if reporting is enabled.MarkerMessagemarker(int markerId)Create a marker message with given marker ID.MarkerMessagemarker(Markers marker)Create a marker message with given marker.voidreport(EventMessage event)Report an event created withevent(Enum)voidreport(MarkerMessage marker)Report a marker created withmarker(Markers)ormarker(int)voidreport(MarkerMessage marker0, MarkerMessage marker1)Report markers created withmarker(Markers)ormarker(int)voidreport(MarkerMessage marker0, MarkerMessage marker1, MarkerMessage marker2)Report markers created withmarker(Markers)ormarker(int)voidreport(Markers marker)Build and report a marker with no parametersvoidreport(Enum<? extends SasEventEnum> event)Build and report an event with no parametersUUIDsteeringId()
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Check if reporting is enabled.
- Returns:
- true if SAS tracing is enabled on the SAS facility this trail was created from
-
event
EventMessage event(Enum<? extends SasEventEnum> event)
Create an event message with given event.
- Parameters:
event- an event defined in an enum that implements SasEventEnum- Returns:
- the event message, ready to add parameters and send
-
marker
MarkerMessage marker(Markers marker)
Create a marker message with given marker.
- Parameters:
marker- a marker defined in theMarkersenum- Returns:
- the marker message, ready to add parameters and send
-
marker
MarkerMessage marker(int markerId)
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
Markersenum.- Parameters:
markerId- a marker constant known to SAS- Returns:
- the marker message, ready to add parameters and send
-
steeringId
UUID steeringId()
-
associate
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.
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.
- Parameters:
otherTrail-scope-
-
report
void report(EventMessage event)
Report an event created with
event(Enum)- Parameters:
event-
-
report
void report(MarkerMessage marker)
Report a marker created with
marker(Markers)ormarker(int)- Parameters:
marker-
-
report
void report(MarkerMessage marker0, MarkerMessage marker1)
Report markers created with
marker(Markers)ormarker(int)- Parameters:
marker0-marker1-
-
report
void report(MarkerMessage marker0, MarkerMessage marker1, MarkerMessage marker2)
Report markers created with
marker(Markers)ormarker(int)- Parameters:
marker0-marker1-marker2-
-
report
void report(Markers marker)
Build and report a marker with no parameters
- Parameters:
marker-
-
report
void report(Enum<? extends SasEventEnum> event)
Build and report an event with no parameters
- Parameters:
event-
-
end
void end()
End this trail. Sends an
Markers.END_MARKERto 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.
-
flush
void flush()
Write reported events and markers for this trail to permanent storage on the SAS server. Sends an
Markers.FLUSH_MARKERto 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.
-
-