com.vaadin.flow.server.dau.

Interface DAUCustomizer

All Superinterfaces:

Serializable

public interface DAUCustomizer extends 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
Only one implementation is allowed and it is discovered through the Vaadin Instantiator.

Since:

24.5

See Also:

  • Method Details

    • getEnforcementNotificationMessages

      default EnforcementNotificationMessages getEnforcementNotificationMessages(SystemMessagesInfo systemMessagesInfo)

      Gets the enforcement messages to use in the given context. The SystemMessagesInfo object contains available information but in most cases some or both of VaadinSession.getCurrent() and UI.getCurrent() can also be used to find more information to help the decision.

      The default implementation returns EnforcementNotificationMessages.DEFAULT.

      Parameters:

      systemMessagesInfo - Locale, current request and other information available.

      Returns:

      an enforcement messages object, never null.

    • getUserIdentitySupplier

      default UserIdentitySupplier 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.