public interface CloudioAttributeListener<T>
class Switch extends ch.hevs.cloudio.endpoint.CloudioObject { @SetPoint public CloudioAttribute<boolean> state; @Measure public CloudioAttribute<boolean> stateFeedback; } class MySwitchSim extends Switch { public MySwitchSim() { state.addListener(new CloudioAttributeListener() { @Override void attributeHasChanged(final CloudioAttribute attribute) { stateFeedback.setValue(attribute.getValue()); } }); } }
Modifier and Type | Method | Description |
---|---|---|
void |
attributeHasChanged(CloudioAttribute<T> attribute) |
This method is called upon an attribute has been changed.
|
void attributeHasChanged(CloudioAttribute<T> attribute)
attribute
- Attribute that has changed.