|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractNamedBean
jmri.AbstractSensor
jmri.jmrix.lenz.XNetSensor
public class XNetSensor
Extend jmri.AbstractSensor for XPressNet layouts.
| Field Summary |
|---|
| Fields inherited from class jmri.AbstractSensor |
|---|
_inverted, _knownState |
| Fields inherited from interface jmri.Sensor |
|---|
ACTIVE, INACTIVE |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
XNetSensor(String systemName)
|
|
XNetSensor(String systemName,
String userName)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
void |
message(XNetMessage l)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. |
void |
message(XNetReply l)
implementing classes will typically have a function/listener to get updates from the layout, which will then call public void firePropertyChange(String propertyName, Object oldValue, Object newValue) _once_ if anything has changed state (or set the commanded state directly) |
void |
requestUpdateFromLayout()
request an update on status by sending an XPressNet message |
| Methods inherited from class jmri.AbstractSensor |
|---|
getInverted, getKnownState, getState, setInverted, setKnownState, setOwnState, setState |
| Methods inherited from class jmri.AbstractNamedBean |
|---|
addPropertyChangeListener, firePropertyChange, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.Sensor |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface jmri.NamedBean |
|---|
getComment, getNumPropertyChangeListeners, getSystemName, getUserName, setComment, setUserName |
| Constructor Detail |
|---|
public XNetSensor(String systemName,
String userName)
public XNetSensor(String systemName)
| Method Detail |
|---|
public void requestUpdateFromLayout()
requestUpdateFromLayout in interface Sensorpublic void message(XNetReply l)
message in interface XNetListenerl - public void message(XNetMessage l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBeandispose in interface Sensordispose in class AbstractNamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||