Class PropertyListenerDescriptor
java.lang.Object
com.inductiveautomation.factorypmi.application.binding.PropertyInteractionDescriptor
com.inductiveautomation.factorypmi.application.binding.PropertyListenerDescriptor
- All Implemented Interfaces:
Adapter.ValueHolder
,InteractionDescriptor
,PropertyChangeListener
,EventListener
public class PropertyListenerDescriptor
extends PropertyInteractionDescriptor
implements PropertyChangeListener, Adapter.ValueHolder
This subclass of PropertyInteractionDescriptor is simply an PID that is also the listener, and a ValueHolder. This
means that this class directly listens to the source, and holds the value when the source value changes.
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyListenerDescriptor
(Component source, PropertyAdapter adapter, String sourceProp, QualifiedValue initValue) -
Method Summary
Modifier and TypeMethodDescriptionReturns the interaction listener (typically our adapter)getPath()
Returns the path to the referenced property.Returns the last known value from the source.void
initialize
(Class type, Object oldInstance, Object newInstance, Encoder out) Serializes this PLDvoid
void
setInteractionListener
(InteractionListener listener) Sets the interaction listener (typically our adapter)void
Sets the value.void
Deprecated.Kept for serializationtoString()
Methods inherited from class com.inductiveautomation.factorypmi.application.binding.PropertyInteractionDescriptor
_getSymbolicSourcePath, _setSymbolicSourcePath, connect, disconnect, getAdapter, getListenable, getListener, getQuality, getSource, getSourceProperty, getSourceQualityProperty, isSerializeSymbolically, setAdapter, setConnected, setListener, setSerializeSymbolically, setSource, setSourceProperty
-
Constructor Details
-
PropertyListenerDescriptor
public PropertyListenerDescriptor() -
PropertyListenerDescriptor
public PropertyListenerDescriptor(Component source, PropertyAdapter adapter, String sourceProp, QualifiedValue initValue)
-
-
Method Details
-
getPath
Returns the path to the referenced property. -
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
getQValue
Returns the last known value from the source.- Specified by:
getQValue
in interfaceAdapter.ValueHolder
-
setQValue
Sets the value.- Specified by:
setQValue
in interfaceAdapter.ValueHolder
-
setValue
Deprecated.Kept for serialization -
toString
- Overrides:
toString
in classPropertyInteractionDescriptor
-
getInteractionListener
Returns the interaction listener (typically our adapter) -
setInteractionListener
Sets the interaction listener (typically our adapter) -
initialize
Serializes this PLD- Specified by:
initialize
in interfaceInteractionDescriptor
- Overrides:
initialize
in classPropertyInteractionDescriptor
-