jmri.jmrix.secsi
Class SerialSensor

java.lang.Object
  extended by jmri.implementation.AbstractNamedBean
      extended by jmri.implementation.AbstractSensor
          extended by jmri.jmrix.secsi.SerialSensor
All Implemented Interfaces:
Serializable, NamedBean, Sensor

public class SerialSensor
extends AbstractSensor

Extend jmri.AbstractSensor for serial systems

Author:
Bob Jacobsen Copyright (C) 2003, 2006, 2007, 2008
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmri.implementation.AbstractSensor
_inverted, _knownState
 
Fields inherited from interface jmri.Sensor
ACTIVE, INACTIVE
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
SerialSensor(String systemName)
           
SerialSensor(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 requestUpdateFromLayout()
          Request an update on status.
 
Methods inherited from class jmri.implementation.AbstractSensor
getInverted, getKnownState, getState, setInverted, setKnownState, setOwnState, setState
 
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, firePropertyChange, getComment, getDisplayName, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, 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, getDisplayName, getNumPropertyChangeListeners, getProperty, getSystemName, getUserName, setComment, setProperty, setUserName
 

Constructor Detail

SerialSensor

public SerialSensor(String systemName)

SerialSensor

public SerialSensor(String systemName,
                    String userName)
Method Detail

dispose

public void dispose()
Description copied from interface: NamedBean
Deactivate this object, so that it releases as many resources as possible and no longer effects others.

For 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.

Specified by:
dispose in interface NamedBean
Specified by:
dispose in interface Sensor
Overrides:
dispose in class AbstractNamedBean

requestUpdateFromLayout

public void requestUpdateFromLayout()
Request an update on status.

Since status is continually being updated, this isn't active now. Eventually, we may want to have this move the related AIU to the top of the polling queue.



Copyright © 1997 - 2009 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads