예제 #1
0
 public static MailBoxFormData prepopulate(MBox mb) {
   MailBoxFormData mbDat = new MailBoxFormData();
   mbDat.setBoxId(mb.getId());
   mbDat.setAddress(mb.getAddress());
   mbDat.setDomain(mb.getDomain());
   mbDat.setDatetime(mb.getTSAsStringWithNull());
   return mbDat;
 }
예제 #2
0
  /**
   * Sets the CD status.
   *
   * @param Status the new CD status
   */
  protected void setCDStatus(int Status) {
    if (status != Status) {
      this.status = Status;

      if (status == 300) {
        atmssMBox.send(new Msg("300", 3, "normal"));
      }

      if (Status == 301) {
        numOf500 = 0; // For demo only
      }

      if (status == 398) {
        shutdown();
      }

      if (status == 399) {
        atmssMBox.send(new Msg("399", 3, "out of service"));
        fatalHalt();
      }
    }
  }
예제 #3
0
  /* (non-Javadoc)
   * @see hwEmulators.EmulatorActions#restart()
   */
  @Override
  public void restart() {
    shutdown();
    long ms = new Random(new Date().getTime()).nextInt(1500) + 200; // 200 - 1700
    try {
      sleep(ms);
    } catch (InterruptedException e) {
    }
    setCDStatus(300);
    setUIEnable(true);
    atmssMBox.send(new Msg("Component Restarted", 3, "Restarted"));

    textArea.setText("");
  }