Package com.vaadin.flow.server.dau
Interface DAUCustomizer
- All Superinterfaces:
Serializable
Interface to be implemented to customize Daily Active Users feature.
By implementing this interface it is possible to:
- provide an user identity supplier to allow the system to count a user once even if it accesses the application on multiple devices
- provide custom messages and a landing page for the enforcement notification popup
Instantiator.- Since:
- 24.5
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault EnforcementNotificationMessagesgetEnforcementNotificationMessages(SystemMessagesInfo systemMessagesInfo) Gets the enforcement messages to use in the given context.default UserIdentitySupplierGets the function to be used to determine the user identity for the current request.
-
Method Details
-
getEnforcementNotificationMessages
default EnforcementNotificationMessages getEnforcementNotificationMessages(SystemMessagesInfo systemMessagesInfo) Gets the enforcement messages to use in the given context. TheSystemMessagesInfoobject contains available information but in most cases some or both ofVaadinSession.getCurrent()andUI.getCurrent()can also be used to find more information to help the decision.
The default implementation returnsEnforcementNotificationMessages.DEFAULT.- Parameters:
systemMessagesInfo- Locale, current request and other information available.- Returns:
- an enforcement messages object, never null.
-
getUserIdentitySupplier
Gets the function to be used to determine the user identity for the current request.
By default, returns null, meaning that user identity is not computed.- Returns:
- the function to be used to determine the user identity for the current request. Can be null.
-