Package com.storedobject.ui
Class ConcurrentClick
java.lang.Object
com.storedobject.ui.ConcurrentClick
A thread-safe utility class for managing click events with concurrent control.
This class ensures that only one click event is processed at a time by acquiring
and releasing a lock during the event execution.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterClick(com.vaadin.flow.component.Component c, Runnable runnable) Registers a click event listener for the given component.
-
Constructor Details
-
ConcurrentClick
public ConcurrentClick()
-
-
Method Details
-
registerClick
Registers a click event listener for the given component. If the component is an instance ofClickNotifier, the providedRunnableis executed when the component is clicked. For other components, a wrapper ensures the givenRunnableis executed through the click pipeline.- Parameters:
c- the component to register the click event listener forrunnable- the action to execute when the component is clicked
-