Ejemplo n.º 1
0
 /**
  * ************************************************************************* Refresh all procedure
  * models ************************************************************************
  */
 public void refresh() {
   try {
     Logger.debug("Refresh executors table", Level.GUI, this);
     Object[] procs = ((IStructuredContentProvider) getContentProvider()).getElements(s_procMgr);
     for (Object procObj : procs) {
       if (procObj instanceof IProcedure) {
         IProcedure proc = (IProcedure) procObj;
         Logger.debug("Executor details" + proc.getProcId(), Level.GUI, this);
         Logger.debug(
             "    controlling client " + proc.getRuntimeInformation().getControllingClient(),
             Level.GUI,
             this);
         Logger.debug(
             "    monitoring clients " + proc.getRuntimeInformation().getMonitoringClients(),
             Level.GUI,
             this);
         proc.getController().updateInfo();
         refresh(proc);
       }
     }
     super.refresh();
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
Ejemplo n.º 2
0
 /**
  * ************************************************************************* Refresh the selected
  * procedure. In case of failure, refresh the whole list, since the procedure may habe disappeared
  * ************************************************************************
  */
 public void refresh(String procId) {
   try {
     IProcedure proc = s_procMgr.getProcedure(procId);
     Logger.debug("Refreshing procedure with id " + procId, Level.GUI, this);
     Logger.debug("Executor details " + proc.getProcId(), Level.GUI, this);
     Logger.debug("    instance " + proc, Level.GUI, this);
     Logger.debug(
         "    controlling client " + proc.getRuntimeInformation().getControllingClient(),
         Level.GUI,
         this);
     Logger.debug(
         "    monitoring clients " + proc.getRuntimeInformation().getMonitoringClients(),
         Level.GUI,
         this);
     refresh(proc);
   } catch (Exception ex) {
     refresh();
   }
 }
Ejemplo n.º 3
0
  /**
   * ************************************************************************* Prepare the blinking
   * *************************************************************************
   */
  private void prepareBlinking() {
    m_blinkSwitch = true;
    long msec = 10000;

    try {
      msec = m_model.getRuntimeInformation().getPromptWarningDelay() * 1000;
    } catch (NumberFormatException ex) {
      ex.printStackTrace();
    }

    m_blinkerLauncher = new PromptBlinkerLauncher(this, msec);
  }
Ejemplo n.º 4
0
 /**
  * ************************************************************************* Constructor
  * ************************************************************************
  */
 public RemoteProcedure(IProcedure wasLocalProcedure) {
   m_procId = wasLocalProcedure.getProcId();
   m_properties = new HashMap<ProcProperties, String>();
   for (ProcProperties prop : ProcProperties.values()) {
     m_properties.put(prop, wasLocalProcedure.getProperty(prop));
   }
   m_controller = new RemoteController();
   ClientMode cmode = wasLocalProcedure.getRuntimeInformation().getClientMode();
   m_executionInformation = new ExecutionInformationHandler(cmode, this);
   IExecutorInfo info = (IExecutorInfo) wasLocalProcedure.getAdapter(ExecutorInfo.class);
   m_properties.put(ProcProperties.PROC_NAME, info.getName());
   m_executionInformation.copyFrom(info);
 }