Search in sources :

Example 6 with QuietShutDownTask

use of jmri.implementation.QuietShutDownTask in project JMRI by JMRI.

the class EcosLocoAddressManager method loadData.

private void loadData() {
    tc.addEcosListener(this);
    Roster.getDefault().addPropertyChangeListener(this);
    EcosMessage m = new EcosMessage("request(10, view)");
    tc.sendWaitMessage(m, this);
    /*m = new EcosMessage("queryObjects(10)");
         tc.sendWaitMessage(m, this);*/
    m = new EcosMessage("queryObjects(10, addr, name, protocol)");
    tc.sendEcosMessage(m, this);
    if (ecosLocoShutDownTask == null) {
        ecosLocoShutDownTask = new QuietShutDownTask("Ecos Loco Database Shutdown") {

            @Override
            public boolean execute() {
                return shutdownDispose();
            }
        };
    }
    if (jmri.InstanceManager.getNullableDefault(jmri.ShutDownManager.class) != null) {
        jmri.InstanceManager.getDefault(jmri.ShutDownManager.class).register(ecosLocoShutDownTask);
    }
}
Also used : QuietShutDownTask(jmri.implementation.QuietShutDownTask)

Aggregations

QuietShutDownTask (jmri.implementation.QuietShutDownTask)6 ArrayList (java.util.ArrayList)2 List (java.util.List)2 ShutDownTask (jmri.ShutDownTask)2 Test (org.junit.Test)2 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 Audio (jmri.Audio)1 AudioException (jmri.AudioException)1 ShutDownManager (jmri.ShutDownManager)1