Search in sources :

Example 6 with ServiceInstanceStatus

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);
}
Also used : ArrayList(java.util.ArrayList) ServiceInstanceStatus(cbit.vcell.message.server.ServiceInstanceStatus)

Example 7 with ServiceInstanceStatus

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);
        }
    }
}
Also used : ServiceInstanceStatus(cbit.vcell.message.server.ServiceInstanceStatus)

Aggregations

ServiceInstanceStatus (cbit.vcell.message.server.ServiceInstanceStatus)7 Date (java.util.Date)4 VCMessagingService (cbit.vcell.message.VCMessagingService)3 ServerMessagingDelegate (cbit.vcell.message.server.ServerMessagingDelegate)3 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)2 VCellServiceMXBeanImpl (cbit.vcell.message.server.jmx.VCellServiceMXBeanImpl)2 DatabaseServerImpl (cbit.vcell.modeldb.DatabaseServerImpl)2 Cachetable (cbit.vcell.simdata.Cachetable)2 DataServerImpl (cbit.vcell.simdata.DataServerImpl)2 DataSetControllerImpl (cbit.vcell.simdata.DataSetControllerImpl)2 File (java.io.File)2 MBeanServer (javax.management.MBeanServer)2 ObjectName (javax.management.ObjectName)2 ConnectionFactory (org.vcell.db.ConnectionFactory)2 KeyFactory (org.vcell.db.KeyFactory)2 VCMessagingException (cbit.vcell.message.VCMessagingException)1 ServiceSpec (cbit.vcell.message.server.ServiceSpec)1 CommandService (cbit.vcell.message.server.cmd.CommandService)1 CommandServiceLocal (cbit.vcell.message.server.cmd.CommandServiceLocal)1 CommandServiceSshNative (cbit.vcell.message.server.cmd.CommandServiceSshNative)1