jmri.jmrix.lenz
Class XNetTurnoutManager

java.lang.Object
  extended by jmri.implementation.AbstractManager
      extended by jmri.managers.AbstractTurnoutManager
          extended by jmri.jmrix.lenz.XNetTurnoutManager
All Implemented Interfaces:
PropertyChangeListener, EventListener, AbstractMRListener, XNetListener, Manager, TurnoutManager
Direct Known Subclasses:
EliteXNetTurnoutManager

public class XNetTurnoutManager
extends AbstractTurnoutManager
implements XNetListener

Implement turnout manager.

System names are "XTnnn", where nnn is the turnout number without padding.

Author:
Bob Jacobsen Copyright (C) 2001

Field Summary
 
Fields inherited from class jmri.implementation.AbstractManager
_tsys, _tuser
 
Constructor Summary
XNetTurnoutManager()
           
 
Method Summary
 Turnout createNewTurnout(String systemName, String userName)
          Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.
 String getClosedText()
          Get text to be used for the Turnout.CLOSED state in user communication.
 String getThrownText()
          Get text to be used for the Turnout.THROWN state in user communication.
static XNetTurnoutManager instance()
           
 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)
          Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.
 char systemLetter()
           
 
Methods inherited from class jmri.managers.AbstractTurnoutManager
askControlType, askNumControlBits, getBySystemName, getByUserName, getTurnout, getValidOperationTypes, newTurnout, provideTurnout, typeLetter
 
Methods inherited from class jmri.implementation.AbstractManager
addPropertyChangeListener, deregister, dispose, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, registerSelf, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.TurnoutManager
getSystemNameList
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, deregister, dispose, getSystemNameArray, makeSystemName, register, removePropertyChangeListener
 

Constructor Detail

XNetTurnoutManager

public XNetTurnoutManager()
Method Detail

systemLetter

public char systemLetter()
Specified by:
systemLetter in interface Manager
Returns:
The system-specific prefix letter for a specific implementation

createNewTurnout

public Turnout createNewTurnout(String systemName,
                                String userName)
Description copied from class: AbstractTurnoutManager
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.

Specified by:
createNewTurnout in class AbstractTurnoutManager
Returns:
never null

message

public void message(XNetReply l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.

getClosedText

public String getClosedText()
Get text to be used for the Turnout.CLOSED state in user communication. Allows text other than "CLOSED" to be use with certain hardware system to represent the Turnout.CLOSED state.

Specified by:
getClosedText in interface TurnoutManager
Overrides:
getClosedText in class AbstractTurnoutManager

getThrownText

public String getThrownText()
Get text to be used for the Turnout.THROWN state in user communication. Allows text other than "THROWN" to be use with certain hardware system to represent the Turnout.THROWN state.

Specified by:
getThrownText in interface TurnoutManager
Overrides:
getThrownText in class AbstractTurnoutManager

message

public void message(XNetMessage l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. Normally, this function will do nothing.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.

instance

public static XNetTurnoutManager instance()


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