コード例 #1
0
ファイル: ClientGui.java プロジェクト: timburrow/ovj3
  public ClientGui(ORB o) throws Exception {
    ShutdownFrame sf;
    BufferedReader reader;
    boolean modulePresent;
    File file;
    CryoThread update;

    orb = o;

    obj = null;
    cryoBay = null;

    // System.out.println("running test client.");

    // instantiate ModuleAccessor
    file = new File("/vnmr/acqqueue/cryoBay.CORBAref");
    if (file.exists()) {
      reader = new BufferedReader(new FileReader(file));
      obj = orb.string_to_object(reader.readLine());
    }

    if (obj == null) {
      throw new Exception("string_to_object is null: cryoBay.CORBAref");
    }

    // System.out.println("Got object.");

    cryoBay = CryoBayHelper.narrow(obj);

    if (cryoBay == null) {
      throw new Exception("cryoBay is null");
    }

    if (cryoBay._non_existent()) {
      throw new Exception("cryoBay is not running");
    }

    sf = new ShutdownFrame(cryoBay);
    update = new CryoThread(cryoBay, sf, this);
    sf.show();
    update.start();
  } /*end of constructor*/
コード例 #2
0
ファイル: ClientGui.java プロジェクト: timburrow/ovj3
  public void run() {

    while (!reconnected) {
      cryo = frame.reconnectServer(orb, this);
      try {
        sleep(1000);
      } catch (Exception e) {
        System.out.println("cannot sleep!");
      }
    }
    // System.out.println("starting cryothread");
    cryoThread = new CryoThread(cryo, frame, clientGui);
    cryoThread.start();
  }