Changeset 360 in tmcsimulator for trunk/src/tmcsim/cadsimulator


Ignore:
Timestamp:
04/09/2019 03:46:18 PM (7 years ago)
Author:
jdalbey
Message:

add spike ShowUserDir?.java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/CADServer.java

    r355 r360  
    181181     * Properties file for the CADSimulator. 
    182182     */ 
    183     private Properties cadSimulatorProperties; 
     183    private Properties cadServerProperties; 
    184184 
    185185    /** 
     
    199199        try 
    200200        { 
    201             cadSimulatorProperties = new Properties(); 
    202             cadSimulatorProperties.load(new FileInputStream(propertiesFile)); 
     201            cadServerProperties = new Properties(); 
     202            cadServerProperties.load(new FileInputStream(propertiesFile)); 
    203203            cadSimLogger.logp(Level.INFO, "CADSimulator", "Constructor", 
    204204                    "Properties loaded from " + propertiesFile); 
     
    219219        { 
    220220            String userInterfaceName = 
    221                     cadSimulatorProperties.getProperty( 
     221                    cadServerProperties.getProperty( 
    222222                    CAD_PROPERTIES.USER_INTERFACE.name); 
    223223            if (userInterfaceName == null) 
     
    244244 
    245245            startRegistry(Integer.parseInt( 
    246                     cadSimulatorProperties.getProperty( 
     246                    cadServerProperties.getProperty( 
    247247                    CAD_PROPERTIES.COOR_RMI_PORT.name).trim())); 
    248248            startRegistry(Integer.parseInt( 
    249                     cadSimulatorProperties.getProperty( 
     249                    cadServerProperties.getProperty( 
    250250                    CAD_PROPERTIES.CAD_RMI_PORT.name).trim())); 
    251251 
     
    253253 
    254254            theATMSMgr = new ATMSManager( 
    255                     cadSimulatorProperties.getProperty( 
     255                    cadServerProperties.getProperty( 
    256256                    CAD_PROPERTIES.ATMS_PROP_FILE.name)); 
    257257             
    258258            theTrafficMgr = new TrafficModelManager( 
    259                     cadSimulatorProperties.getProperty( 
     259                    cadServerProperties.getProperty( 
    260260                    CAD_PROPERTIES.TRAFFICMGR_PROP_FILE.name), 
    261261                    theCoordinator); 
     
    264264 
    265265            theMediaMgr = new MediaManager( 
    266                     cadSimulatorProperties.getProperty( 
     266                    cadServerProperties.getProperty( 
    267267                    CAD_PROPERTIES.MEDIA_PROP_FILE.name), 
    268268                    theATMSMgr, theModel); 
    269269 
    270270            theParamicsSimMgr = new ParamicsSimulationManager( 
    271                     cadSimulatorProperties.getProperty( 
     271                    cadServerProperties.getProperty( 
    272272                    CAD_PROPERTIES.PARAMICS_PROP_FILE.name), 
    273273                    theCoordinator, theMediaMgr); 
    274274 
    275275            theSoundPlayer = new SoundPlayer( 
    276                     cadSimulatorProperties.getProperty( 
     276                    cadServerProperties.getProperty( 
    277277                    CAD_PROPERTIES.AUDIO_LOCATION.name)); 
    278278            theSoundPlayer.start(); 
     
    283283            //Begin accepting Client connections 
    284284            CADSimulatorSocketHandler tmsh = new CADSimulatorSocketHandler( 
    285                     Integer.parseInt(cadSimulatorProperties.getProperty( 
     285                    Integer.parseInt(cadServerProperties.getProperty( 
    286286                    CAD_PROPERTIES.CLIENT_PORT.name).trim())); 
    287287            tmsh.start(); 
     
    297297        try 
    298298        { 
    299             if (cadSimulatorProperties.getProperty( 
     299            if (cadServerProperties.getProperty( 
    300300                    CAD_PROPERTIES.CMS_XML_FILE.name) != null) 
    301301            { 
    302302                CMSDiversionDB.getInstance().loadFromXML( 
    303303                        DocumentBuilderFactory.newInstance().newDocumentBuilder() 
    304                         .parse(new File(cadSimulatorProperties.getProperty( 
     304                        .parse(new File(cadServerProperties.getProperty( 
    305305                        CAD_PROPERTIES.CMS_XML_FILE.name)))); 
    306306            } 
     
    311311 
    312312            JOptionPane.showMessageDialog(new JWindow(), "Unable to open " 
    313                     + cadSimulatorProperties.getProperty(CAD_PROPERTIES.CMS_XML_FILE.name), 
     313                    + cadServerProperties.getProperty(CAD_PROPERTIES.CMS_XML_FILE.name), 
    314314                    "Initialization Error", JOptionPane.WARNING_MESSAGE); 
    315315        } 
Note: See TracChangeset for help on using the changeset viewer.