Class BindingCollection
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<PropertyKey,AbstractBindingHarness>
-
- com.inductiveautomation.perspective.gateway.model.BindingCollection
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<PropertyKey,AbstractBindingHarness>
public class BindingCollection extends java.util.HashMap<PropertyKey,AbstractBindingHarness>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBindingCollection.BindingHarnessMakerSince different kinds of objects may use different subclasses of AbstractBindingHarness, this factory is provided to instantiate the actual harness instances required.
-
Field Summary
Fields Modifier and Type Field Description static BindingCollectionEMPTYA shared, fundamentally empty and immutable version of a binding collection.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyConfigChange(PropertyConfigChange change)Applies a configuration change to the binding collection.static BindingCollectioncreate(PropertyConfigCollection propConfigs, BindingCollection.BindingHarnessMaker factory, LoggerEx log)static BindingCollectioncreate(PropertyConfigCollection propConfigs, BindingCollection.BindingHarnessMaker factory, LoggerEx log, boolean isDesigner)Creates a BindingCollection from the given collection of property config objects, (which may be null).java.util.Collection<PropertyReference>resolveReferences()voidshutdown()Shuts down all bindingsvoidstartup()Starts up all bindings-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
EMPTY
public static final BindingCollection EMPTY
A shared, fundamentally empty and immutable version of a binding collection.
-
-
Method Detail
-
create
public static BindingCollection create(@Nullable PropertyConfigCollection propConfigs, @Nonnull BindingCollection.BindingHarnessMaker factory, @Nonnull LoggerEx log)
-
create
public static BindingCollection create(@Nullable PropertyConfigCollection propConfigs, @Nonnull BindingCollection.BindingHarnessMaker factory, @Nonnull LoggerEx log, boolean isDesigner)
Creates a BindingCollection from the given collection of property config objects, (which may be null). Will only create bindings that are configured to be enabled.- Parameters:
isDesigner- hint to the creation process that lets it optimize for client components with zero bindings, so they can share an immutable, empty map.
-
resolveReferences
public java.util.Collection<PropertyReference> resolveReferences()
-
startup
public void startup()
Starts up all bindings
-
shutdown
public void shutdown()
Shuts down all bindings
-
applyConfigChange
public void applyConfigChange(PropertyConfigChange change)
Applies a configuration change to the binding collection. Any errors that are encountered are logged as WARN messages.
-
-