Examples of addRunnable()


Examples of com.projity.job.Job.addRunnable()

        setProgress(1f);
        log.info("END: Import resources");
        return null;
        }
      });
      job.addRunnable(new JobRunnable("Finish import",1.0f){ //$NON-NLS-1$
      public Object run() throws Exception{
        log.info("BEGIN: Finish import");
        Object r=convertToProjity();
        log.info("END: Finish import");
        return r;
View Full Code Here

Examples of com.projity.job.Job.addRunnable()

   * Currently not implemented
   */
  public Job getExportFileJob(){
      Session session=SessionFactory.getInstance().getLocalSession();
    Job job=new Job(session.getJobQueue(),"exportFile","Exporting...",true); //$NON-NLS-1$ //$NON-NLS-2$
      job.addRunnable(new JobRunnable("Local: export",1.0f){ //$NON-NLS-1$
        public Object run() throws Exception{
           MSPDISerializer serializer = new MSPDISerializer();
          serializer.setJob(this);
          serializer.saveProject(project,fileName);
          return null;
View Full Code Here

Examples of com.projity.job.Job.addRunnable()

    public Job getImportFileJob(){
      final Serializer serializer=new Serializer();
      final FileImporter importer=this;
      final Job job=new Job(importer.getJobQueue(),"importFile",Messages.getString("LocalFileImporter.Importing"),true); //$NON-NLS-1$ //$NON-NLS-2$
        job.addRunnable(new JobRunnable("Import",1.0f){ //$NON-NLS-1$
        public Object run() throws Exception{
              //DataUtil serializer=new DataUtil();
              System.out.println("Loading "+importer.getFileName()+"..."); //$NON-NLS-1$ //$NON-NLS-2$

              long t1=System.currentTimeMillis();
View Full Code Here

Examples of com.projity.job.Job.addRunnable()

        setProgress(1f);
        return null;
        }
      });

        job.addRunnable(new JobRunnable("Import",1.0f){ //$NON-NLS-1$
        public Object run() throws Exception{
              System.out.println("Deserializing..."); //$NON-NLS-1$
              long t1=System.currentTimeMillis();
              ResourceMappingForm form=getResourceMapping();
//              project=serializer.deserializeProject(projectData,false,true,resourceMap);
View Full Code Here

Examples of com.projity.job.Job.addRunnable()

        return createProjectAsync(opt);
      }
    };
    if (opt.isSync()){
        Job job=new Job(SessionFactory.getInstance().getJobQueue(),"createProject","Creating project...",false);
        job.addRunnable(runnable);
      job.addSync();
      SessionFactory.getInstance().schedule(job);
      try {
        Project project=(Project)job.waitResult();
        System.out.println("Project returned end lock");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.