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);
}
}
Aggregations