Package com.tick42.glue.core.contexts
Interface SharedContexts
public interface SharedContexts
Shared contexts.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionnames()The names of all shared context.default CompletionStage<Context<Map<String,Object>>> Subscribes to a shared context with specified name.<T> CompletionStage<Context<T>>subscribe(String name, ReifiedType<T> type, T defaultData) default CompletionStage<Context<Map<String,Object>>> Updates a shared context with specified name by applying a delta.updatePaths(String name, Map<String, Object> deltaPaths) Update context data with specified delta.
-
Method Details
-
names
Collection<String> names()The names of all shared context.- Returns:
- names of all shared context
-
subscribe
-
subscribe
Subscribes to a shared context with specified name.- Parameters:
name- name of the shared context- Returns:
- stage that is completed when context is subscribed, never
null - Since:
- 1.2
-
subscribe
-
update
Updates a shared context with specified name by applying a delta.- Parameters:
name- name of the shared contextdelta- changes to apply to the shared context- Returns:
- stage that is completed when context is updated, never
null - Since:
- 1.2
-
updatePaths
Update context data with specified delta. Allows you to use "paths" in the structure to update/remove nested properties.- Parameters:
name- name of the shared contextdeltaPaths- changes to apply to the shared context- Returns:
- stage that is completed when context is updated, never
null - Since:
- 1.3.9
-