Record Class LatestInteraction
java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.LatestInteraction
- Record Components:
timestamp- when the last invocation of the interaction endedroute- the route template the view was onview- the simple class name of the active navigation target, ornullcomponent- the class name of the component the user worked, ornullcaption- the component's caption, ornullevent- the event name, e.g.clickoutcome-CapturedInteraction.OUTCOME_SUCCESSorCapturedInteraction.OUTCOME_ERRORserverMs- the time the application's listeners took, summed over every invocation the request carriedinvocations- how many invocations the request carried
public record LatestInteraction(Instant timestamp, String route, String view, String component, String caption, String event, String outcome, double serverMs, int invocations)
extends Record
The most recent user interaction, whatever its outcome or duration, as the
development-mode Copilot panel shows it under "your last interaction".
Unlike a CapturedInteraction this is not evidence for an insight:
nothing went wrong, and only one is ever kept. It is recorded in development
mode only, since the caption it carries is read off the screen.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaption()Returns the value of thecaptionrecord component.Returns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinvocationsrecord component.outcome()Returns the value of theoutcomerecord component.route()Returns the value of therouterecord component.doubleserverMs()Returns the value of theserverMsrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.view()Returns the value of theviewrecord component.
-
Constructor Details
-
LatestInteraction
public LatestInteraction(Instant timestamp, String route, String view, String component, String caption, String event, String outcome, double serverMs, int invocations) Creates an instance of aLatestInteractionrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentroute- the value for therouterecord componentview- the value for theviewrecord componentcomponent- the value for thecomponentrecord componentcaption- the value for thecaptionrecord componentevent- the value for theeventrecord componentoutcome- the value for theoutcomerecord componentserverMs- the value for theserverMsrecord componentinvocations- the value for theinvocationsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
view
Returns the value of theviewrecord component.- Returns:
- the value of the
viewrecord component
-
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
serverMs
public double serverMs()Returns the value of theserverMsrecord component.- Returns:
- the value of the
serverMsrecord component
-
invocations
public int invocations()Returns the value of theinvocationsrecord component.- Returns:
- the value of the
invocationsrecord component
-