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 interface
BindingCollection.BindingHarnessMaker
Since 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 BindingCollection
EMPTY
A 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 void
applyConfigChange(PropertyConfigChange change)
Applies a configuration change to the binding collection.static BindingCollection
create(PropertyConfigCollection propConfigs, BindingCollection.BindingHarnessMaker factory, LoggerEx log)
static BindingCollection
create(PropertyConfigCollection propConfigs, BindingCollection.BindingHarnessMaker factory, LoggerEx log, boolean isDesigner)
Creates a BindingCollection from the given collection of property config objects, (which may be null).void
shutdown()
Shuts down all bindingsvoid
startup()
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.
-
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.
-
-