001package jmri.jmris;
002
003/**
004 * This class provides access to the service handlers for individual object
005 * types which can be passed to a parser visitor object.
006 *
007 * @author Paul Bender Copyright (C) 2010
008 *
009 */
010public class ServiceHandler {
011
012    // private service handler objects
013    private AbstractPowerServer powerServer = null;
014    private AbstractLightServer lightServer = null;
015    private AbstractTurnoutServer turnoutServer = null;
016    private AbstractSensorServer sensorServer = null;
017    private AbstractProgrammerServer programmerServer = null;
018    private AbstractTimeServer timeServer = null;
019    private AbstractThrottleServer throttleServer = null;
020
021    /*
022     *  set the powerServer instance
023     *  @param ps is an instance of an AbstractPowerServer 
024     *            derived class.
025     */
026    public void setPowerServer(AbstractPowerServer ps) {
027        powerServer = ps;
028    }
029
030    /*
031     *  get the powerServer instance
032     *  @return an instance of an AbstractPowerServer 
033     *            derived class.
034     */
035    public AbstractPowerServer getPowerServer() {
036        return powerServer;
037    }
038
039    /*
040     *  set the lightServer instance
041     *  @param ls is an instance of an AbstractLightServer 
042     *            derived class.
043     */
044    public void setLightServer(AbstractLightServer ls) {
045        lightServer = ls;
046    }
047
048    /*
049     *  get the lightServer instance
050     *  @return an instance of an AbstractLightServer 
051     *            derived class.
052     */
053    public AbstractLightServer getLightServer() {
054        return lightServer;
055    }
056
057    /*
058     *  set the turnoutServer instance
059     *  @param ts is an instance of an AbstractTurnoutServer 
060     *            derived class.
061     */
062    public void setTurnoutServer(AbstractTurnoutServer ts) {
063        turnoutServer = ts;
064    }
065
066    /*
067     *  get the turnoutServer instance
068     *  @return an instance of an AbstractTurnoutServer 
069     *            derived class.
070     */
071    public AbstractTurnoutServer getTurnoutServer() {
072        return turnoutServer;
073    }
074
075    /*
076     *  set the sensorServer instance
077     *  @param ss is an instance of an AbstractSensorServer 
078     *            derived class.
079     */
080    public void setSensorServer(AbstractSensorServer ss) {
081        sensorServer = ss;
082    }
083
084    /*
085     *  get the sensorServer instance
086     *  @return an instance of an AbstractSensorServer 
087     *            derived class.
088     */
089    public AbstractSensorServer getSensorServer() {
090        return sensorServer;
091    }
092
093    /*
094     *  set the programmerServer instance
095     *  @param ps is an instance of an AbstractProgrammerServer 
096     *            derived class.
097     */
098    public void setProgrammerServer(AbstractProgrammerServer ps) {
099        programmerServer = ps;
100    }
101
102    /*
103     *  get the programmerServer instance
104     *  @return an instance of an AbstractProgrammerServer 
105     *            derived class.
106     */
107    public AbstractProgrammerServer getProgrammerServer() {
108        return programmerServer;
109    }
110
111    /*
112     *  set the timeServer instance
113     *  @param ps is an instance of an AbstractTimeServer 
114     *            derived class.
115     */
116    public void setTimeServer(AbstractTimeServer ps) {
117        timeServer = ps;
118    }
119
120    /*
121     *  get the timeServer instance
122     *  @return an instance of an AbstractTimeServer 
123     *            derived class.
124     */
125    public AbstractTimeServer getTimeServer() {
126        return timeServer;
127    }
128
129    /*
130     *  set the throttleServer instance
131     *  @param ts is an instance of an AbstractThrottleServer 
132     *            derived class.
133     */
134    public void setThrottleServer(AbstractThrottleServer ts) {
135        throttleServer = ts;
136    }
137
138    /*
139     *  get the throttleServer instance
140     *  @return an instance of an AbstractThrottleServer 
141     *            derived class.
142     */
143    public AbstractThrottleServer getThrottleServer() {
144        return throttleServer;
145    }
146
147}