Package jmri.jmrix.mqtt
Class MqttPowerManager
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.managers.AbstractPowerManager<MqttSystemConnectionMemo>
-
- jmri.jmrix.mqtt.MqttPowerManager
-
- All Implemented Interfaces:
java.util.EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,MqttEventListener
,PowerManager
public class MqttPowerManager extends AbstractPowerManager<MqttSystemConnectionMemo> implements MqttEventListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.managers.AbstractPowerManager
AbstractPowerManager.TimeKeeper
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
rcvTopic
java.lang.String
sendTopic
-
Fields inherited from class jmri.managers.AbstractPowerManager
memo, power
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description MqttPowerManager(MqttSystemConnectionMemo memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
boolean
implementsIdle()
void
notifyMqttMessage(java.lang.String receivedTopic, java.lang.String message)
void
setPower(int v)
void
setRcvTopic(java.lang.String rcvTopic)
void
setSendTopic(java.lang.String sendTopic)
-
Methods inherited from class jmri.managers.AbstractPowerManager
firePowerPropertyChange, getPower, getUserName, timeSinceLastPowerOn
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
MqttPowerManager
public MqttPowerManager(MqttSystemConnectionMemo memo)
-
-
Method Detail
-
setSendTopic
public void setSendTopic(@Nonnull java.lang.String sendTopic)
-
setRcvTopic
public void setRcvTopic(@Nonnull java.lang.String rcvTopic)
-
implementsIdle
public boolean implementsIdle()
- Specified by:
implementsIdle
in interfacePowerManager
-
setPower
public void setPower(int v) throws JmriException
Description copied from class:AbstractPowerManager
- Specified by:
setPower
in interfacePowerManager
- Overrides:
setPower
in classAbstractPowerManager<MqttSystemConnectionMemo>
- Throws:
JmriException
-
dispose
public void dispose() throws JmriException
- Specified by:
dispose
in interfacePowerManager
- Throws:
JmriException
-
notifyMqttMessage
public void notifyMqttMessage(java.lang.String receivedTopic, java.lang.String message)
- Specified by:
notifyMqttMessage
in interfaceMqttEventListener
-
-