use of org.yamcs.studio.core.model.ManagementListener in project yamcs-studio by yamcs.
the class YamcsUIPlugin method postWorkbenchStartup.
/**
* Hook called by application layer to bootstrap connection state
*/
public void postWorkbenchStartup(IWorkbench workbench) {
// Listen to processing-info updates
// Trigger initial state
doUpdateGlobalProcessingState(workbench, null);
ManagementCatalogue.getInstance().addManagementListener(new ManagementListener() {
@Override
public void processorUpdated(ProcessorInfo processorInfo) {
updateGlobalProcessingState(processorInfo);
}
@Override
public void processorClosed(ProcessorInfo processorInfo) {
updateGlobalProcessingState(processorInfo);
}
@Override
public void statisticsUpdated(Statistics stats) {
}
@Override
public void clientUpdated(ClientInfo clientInfo) {
updateGlobalProcessingState(clientInfo);
}
@Override
public void clientDisconnected(ClientInfo clientInfo) {
updateGlobalProcessingState(clientInfo);
}
@Override
public void instanceUpdated(ConnectionInfo connectionInfo) {
}
@Override
public void clearAllManagementData() {
}
});
// Request connection to Yamcs server
boolean singleConnectionMode = getPreferenceStore().getBoolean("singleConnectionMode");
if (!singleConnectionMode && ConnectionPreferences.isAutoConnect()) {
RCPUtils.runCommand("org.yamcs.studio.core.ui.autoconnect");
}
}
Aggregations