|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.AbstractProxyManager
jmri.managers.ProxyTurnoutManager
public class ProxyTurnoutManager
Implementation of a TurnoutManager that can serves as a proxy for multiple system-specific implementations.
| Field Summary | |
|---|---|
(package private) static org.slf4j.Logger |
log
|
| Fields inherited from interface jmri.Manager |
|---|
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXS, MEMORIES, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS |
| Constructor Summary | |
|---|---|
ProxyTurnoutManager()
|
|
| Method Summary | |
|---|---|
void |
addManager(Manager m)
Revise superclass behavior: support TurnoutOperations |
boolean |
allowMultipleAdditions(String systemName)
A method that determines if it is possible to add a range of turnouts in numerical order eg 10 to 30 will return true. |
int |
askControlType(String systemName)
Get from the user, the type of output to be used bits to control a turnout. |
int |
askNumControlBits(String systemName)
Get from the user, the number of addressed bits used to control a turnout. |
String |
createSystemName(String curAddress,
String prefix)
Returns a system name for a given hardware address and system prefix. |
Turnout |
getBySystemName(String systemName)
Locate an instance based on a system name. |
Turnout |
getByUserName(String userName)
Locate an instance based on a user name. |
String |
getClosedText()
Get text to be used for the Turnout.CLOSED state in user communication. |
String |
getDefaultClosedSpeed()
|
String |
getDefaultThrownSpeed()
|
String |
getNextValidAddress(String curAddress,
String prefix)
Determine if the address supplied is valid and free, if not then it shall return the next free valid address up to a maximum of 10 address away from the initial address. |
String |
getThrownText()
Get text to be used for the Turnout.THROWN state in user communication. |
Turnout |
getTurnout(String name)
Locate via user name, then system name if needed. |
String[] |
getValidOperationTypes()
TurnoutOperation support. |
int |
getXMLOrder()
|
boolean |
isControlTypeSupported(String systemName)
Determines if the manager supports the handling of pulsed and steady state control as the askControlType will always return a value even if it is not supported |
boolean |
isNumControlBitsSupported(String systemName)
Determines if the manager supports multiple control bits, as the askNumControlBits will always return a value even if it is not supported |
protected NamedBean |
makeBean(int i,
String systemName,
String userName)
Defer creation of the proper type to the subclass |
protected AbstractManager |
makeInternalManager()
|
Turnout |
newTurnout(String systemName,
String userName)
Return an instance with the specified system and user names. |
Turnout |
provideTurnout(String name)
Locate via user name, then system name if needed. |
void |
setDefaultClosedSpeed(String speed)
|
void |
setDefaultThrownSpeed(String speed)
|
| Methods inherited from class jmri.managers.AbstractProxyManager |
|---|
addPropertyChangeListener, deregister, dispose, getBeanBySystemName, getBeanByUserName, getManagerList, getMgr, getNamedBean, getNamedBeanList, getSystemNameArray, getSystemNameList, getSystemPrefix, makeSystemName, match, matchTentative, newNamedBean, nMgrs, provideNamedBean, register, removePropertyChangeListener, systemLetter, typeLetter |
| 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, getBeanBySystemName, getBeanByUserName, getNamedBean, getNamedBeanList, getSystemNameArray, getSystemPrefix, makeSystemName, register, removePropertyChangeListener, systemLetter, typeLetter |
| Field Detail |
|---|
static org.slf4j.Logger log
| Constructor Detail |
|---|
public ProxyTurnoutManager()
| Method Detail |
|---|
protected AbstractManager makeInternalManager()
makeInternalManager in class AbstractProxyManagerpublic void addManager(Manager m)
addManager in class AbstractProxyManagerpublic Turnout getTurnout(String name)
getTurnout in interface TurnoutManagername -
protected NamedBean makeBean(int i,
String systemName,
String userName)
AbstractProxyManager
makeBean in class AbstractProxyManageri - Which manager to invokepublic Turnout provideTurnout(String name)
TurnoutManager
provideTurnout in interface TurnoutManagername - User name, system name, or address which
can be promoted to system name
public Turnout getBySystemName(String systemName)
getBySystemName in interface TurnoutManagerpublic Turnout getByUserName(String userName)
getByUserName in interface TurnoutManager
public Turnout newTurnout(String systemName,
String userName)
This will always return a valid object reference for a valid request; a new object will be created if necessary. In that case:
newTurnout in interface TurnoutManagerpublic String getClosedText()
getClosedText in interface TurnoutManagerpublic String getThrownText()
getThrownText in interface TurnoutManagerpublic int askNumControlBits(String systemName)
askNumControlBits in interface TurnoutManagerpublic int askControlType(String systemName)
askControlType in interface TurnoutManagerpublic boolean isControlTypeSupported(String systemName)
TurnoutManager
isControlTypeSupported in interface TurnoutManagerpublic boolean isNumControlBitsSupported(String systemName)
TurnoutManager
isNumControlBitsSupported in interface TurnoutManagerpublic String[] getValidOperationTypes()
getValidOperationTypes in interface TurnoutManagerpublic boolean allowMultipleAdditions(String systemName)
TurnoutManager
allowMultipleAdditions in interface TurnoutManager
public String createSystemName(String curAddress,
String prefix)
throws JmriException
TurnoutManager
createSystemName in interface TurnoutManagerJmriException
public String getNextValidAddress(String curAddress,
String prefix)
throws JmriException
TurnoutManager
getNextValidAddress in interface TurnoutManagercurAddress - - The hardware address of the turnout we which to check.prefix - - The System Prefix used to make up the systemName
JmriException
public void setDefaultClosedSpeed(String speed)
throws JmriException
setDefaultClosedSpeed in interface TurnoutManagerJmriException
public void setDefaultThrownSpeed(String speed)
throws JmriException
setDefaultThrownSpeed in interface TurnoutManagerJmriExceptionpublic String getDefaultThrownSpeed()
getDefaultThrownSpeed in interface TurnoutManagerpublic String getDefaultClosedSpeed()
getDefaultClosedSpeed in interface TurnoutManagerpublic int getXMLOrder()
getXMLOrder in interface Manager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||