We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.flow.data.provider.hierarchy.
Class HierarchicalCommunicationController<T>
- java.lang.Object
-
- com.vaadin.flow.data.provider.hierarchy.HierarchicalCommunicationController<T>
-
Type Parameters:
T
- the target bean typeAll Implemented Interfaces:
public class HierarchicalCommunicationController<T> extends Object implements Serializable
HierarchicalCommunicationController controls all the communication to client.
Since:
1.2
See Also:
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Modifier and Type Method Description void
confirmUpdate(int updateId)
void
flush()
elemental.json.JsonValue
generateJson(T item)
void
setRequestRange(int start, int length)
void
setResendEntireRange(boolean resend)
void
unregisterPassivatedKeys()
-
-
-
Constructor Detail
-
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 Detail
-
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
public elemental.json.JsonValue generateJson(T item)
-
-