Class HierarchicalCommunicationController<T>
java.lang.Object
com.vaadin.flow.data.provider.hierarchy.HierarchicalCommunicationController<T>
- Type Parameters:
T
- the target bean type
- All Implemented Interfaces:
Serializable
HierarchicalCommunicationController controls all the communication to client.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalCommunicationController
(String parentKey, DataKeyMapper<T> keyMapper, HierarchyMapper<T, ?> mapper, DataGenerator<T> dataGenerator, SerializableFunction<Integer, HierarchicalArrayUpdater.HierarchicalUpdate> startUpdate, SerializableBiFunction<String, Range, Stream<T>> fetchItems) Constructs communication controller with support for hierarchical data structure. -
Method Summary
Modifier and TypeMethodDescriptionvoid
confirmUpdate
(int updateId) void
flush()
elemental.json.JsonValue
generateJson
(T item) void
setRequestRange
(int start, int length) void
setResendEntireRange
(boolean resend) void
-
Constructor Details
-
HierarchicalCommunicationController
public HierarchicalCommunicationController(String parentKey, DataKeyMapper<T> keyMapper, HierarchyMapper<T, ?> mapper, DataGenerator<T> dataGenerator, SerializableFunction<Integer, HierarchicalArrayUpdater.HierarchicalUpdate> startUpdate, SerializableBiFunction<String, Range, Stream<T>> fetchItems) Constructs communication controller with support for hierarchical data structure.- Parameters:
parentKey
- parent key or null if rootkeyMapper
- Object to String key mappermapper
- Mapper for hierarchical datadataGenerator
- A data generator for itemsstartUpdate
- Function for creating a newArrayUpdater.Update
for clientfetchItems
- Function for fetching items for target parent and specified range
-
-
Method Details
-
flush
public void flush() -
confirmUpdate
public void confirmUpdate(int updateId) -
setRequestRange
public void setRequestRange(int start, int length) -
setResendEntireRange
public void setResendEntireRange(boolean resend) -
unregisterPassivatedKeys
public void unregisterPassivatedKeys() -
generateJson
-