use of cbit.vcell.message.server.ServiceInstanceStatus in project vcell by virtualcell.
the class ServerManageConsole method onArrivingService.
/**
* Insert the method's description here.
* Creation date: (9/10/2003 2:27:25 PM)
* @param service cbit.vcell.messaging.admin.VCellService
*/
private void onArrivingService(ServiceInstanceStatus arrivingService) {
if (arrivingService.getType().equals(ServiceType.SERVERMANAGER)) {
serviceInstanceStatusList.add(0, arrivingService);
} else {
boolean bDefined = false;
List<ServiceInstanceStatus> tempList = new ArrayList<ServiceInstanceStatus>(serviceInstanceStatusList);
for (int i = 0; i < tempList.size(); i++) {
ServiceInstanceStatus sis = tempList.get(i);
if (sis.getSpecID().equals(arrivingService.getSpecID())) {
if (sis.isRunning()) {
serviceInstanceStatusList.add(arrivingService);
} else {
serviceInstanceStatusList.set(i, arrivingService);
}
bDefined = true;
break;
}
}
if (!bDefined) {
serviceInstanceStatusList.add(arrivingService);
}
}
showServices(serviceInstanceStatusList);
}
use of cbit.vcell.message.server.ServiceInstanceStatus in project vcell by virtualcell.
the class ServerManageConsole method serviceStatusTable_MouseClicked.
/**
* Comment
*/
public void serviceStatusTable_MouseClicked(java.awt.event.MouseEvent mouseEvent) {
int selectedCount = getServiceStatusTable().getSelectedRowCount();
int[] selectedRows = getServiceStatusTable().getSelectedRows();
if (selectedRows == null || selectedCount < 1) {
return;
}
getStopServiceButton().setEnabled(false);
getStartServiceButton().setEnabled(false);
for (int i = 0; i < selectedCount; i++) {
int row = selectedRows[i];
ServiceInstanceStatus serviceInstanceStatus = (ServiceInstanceStatus) ((ServiceInstanceStatusTableModel) getServiceStatusTable().getModel()).getValueAt(row);
if (serviceInstanceStatus.isRunning()) {
getStopServiceButton().setEnabled(true);
} else {
// getStartServiceButton().setEnabled(true);
}
}
}
Aggregations