Exemplo n.º 1
0
  public List<IDEAJob> getJobs(long sessId, String jobsMD)
      throws FileNotFoundException, IOException, ClassNotFoundException {

    if (runningBatch != null && runningBatch.getSessId() == sessId) {
      return runningBatch.getJobs();
    }

    for (Iterator<IDEABatch> it = batches.iterator(); it.hasNext(); ) {
      IDEABatch batch = it.next();
      if (batch.getSessId() == sessId) return batch.getJobs();
    }

    ObjectInputStream ois = new ObjectInputStream(new FileInputStream(jobsMD));
    IDEABatchFile batch = (IDEABatchFile) ois.readObject();

    List<IDEAJob> result = batch.jobList;

    ois.close();
    return result;
  }