Package com.vaadin.flow.server.dau
Class FlowDauIntegration
java.lang.Object
com.vaadin.flow.server.dau.FlowDauIntegration
A utility class for various daily active users collecting methods.
For internal use only. May be renamed or removed in a future release.
- Since:
- 24.5
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyEnforcement
(VaadinRequest request, Predicate<VaadinRequest> enforceableRequest) Potentially applies enforcement to the current request if DAU limit is exceeded.static jakarta.servlet.http.Cookie
generateNewCookie
(VaadinRequest request) Generates a new cookie for counting daily active users within 24 hour time interval.
-
Method Details
-
generateNewCookie
Generates a new cookie for counting daily active users within 24 hour time interval.trackingHash$creationTime
, withcreationTime
expressed as number of milliseconds from the epoch of 1970-01-01T00:00:00Z. The cookie creation time is required on subsequent requests to detect active users. By default, the cookie expires after 24 hours.- Parameters:
request
- http request from browser- Returns:
- http cookie to be used to count application's end-users daily
-
applyEnforcement
public static void applyEnforcement(VaadinRequest request, Predicate<VaadinRequest> enforceableRequest) Potentially applies enforcement to the current request if DAU limit is exceeded.EnforcementException
is thrown.- Parameters:
request
- the Vaadin requestenforceableRequest
- predicate to check if the request can be blocked or not.- Throws:
DauEnforcementException
- if request must be blocked because of DAU limit exceeded.
-