Package jmri.jmris
Class AbstractTurnoutServer
- java.lang.Object
-
- jmri.jmris.AbstractTurnoutServer
-
- Direct Known Subclasses:
JmriSRCPTurnoutServer
,SimpleTurnoutServer
public abstract class AbstractTurnoutServer extends java.lang.Object
Abstract interface between the a JMRI turnout and a network connection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractTurnoutServer.TurnoutListener
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,AbstractTurnoutServer.TurnoutListener>
turnouts
-
Constructor Summary
Constructors Constructor Description AbstractTurnoutServer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addTurnoutToList(java.lang.String turnoutName)
void
closeTurnout(java.lang.String turnoutName)
void
dispose()
protected AbstractTurnoutServer.TurnoutListener
getListener(java.lang.String turnoutName)
Turnout
initTurnout(java.lang.String turnoutName)
abstract void
parseStatus(java.lang.String statusString)
protected void
removeTurnoutFromList(java.lang.String turnoutName)
abstract void
sendErrorStatus(java.lang.String turnoutName)
abstract void
sendStatus(java.lang.String turnoutName, int Status)
void
throwTurnout(java.lang.String turnoutName)
-
-
-
Field Detail
-
turnouts
protected final java.util.HashMap<java.lang.String,AbstractTurnoutServer.TurnoutListener> turnouts
-
-
Constructor Detail
-
AbstractTurnoutServer
public AbstractTurnoutServer()
-
-
Method Detail
-
sendStatus
public abstract void sendStatus(java.lang.String turnoutName, int Status) throws java.io.IOException
- Throws:
java.io.IOException
-
sendErrorStatus
public abstract void sendErrorStatus(java.lang.String turnoutName) throws java.io.IOException
- Throws:
java.io.IOException
-
parseStatus
public abstract void parseStatus(java.lang.String statusString) throws JmriException, java.io.IOException
- Throws:
JmriException
java.io.IOException
-
addTurnoutToList
protected void addTurnoutToList(java.lang.String turnoutName)
-
removeTurnoutFromList
protected void removeTurnoutFromList(java.lang.String turnoutName)
-
initTurnout
public Turnout initTurnout(java.lang.String turnoutName) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
closeTurnout
public void closeTurnout(java.lang.String turnoutName)
-
throwTurnout
public void throwTurnout(java.lang.String turnoutName)
-
dispose
public void dispose()
-
getListener
protected AbstractTurnoutServer.TurnoutListener getListener(java.lang.String turnoutName)
-
-