T
- the target bean typepublic class HierarchicalCommunicationController<T> extends Object implements Serializable
Constructor and 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.
|
Modifier and Type | Method and 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() |
public HierarchicalCommunicationController(String parentKey, DataKeyMapper<T> keyMapper, HierarchyMapper<T,?> mapper, DataGenerator<T> dataGenerator, SerializableFunction<Integer,HierarchicalArrayUpdater.HierarchicalUpdate> startUpdate, SerializableBiFunction<String,Range,Stream<T>> fetchItems)
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 new ArrayUpdater.Update
for clientfetchItems
- Function for fetching items for target parent and specified
rangepublic void flush()
public void confirmUpdate(int updateId)
public void setRequestRange(int start, int length)
public void setResendEntireRange(boolean resend)
public void unregisterPassivatedKeys()
public elemental.json.JsonValue generateJson(T item)
Copyright © 2019. All rights reserved.