Examples of run()


Examples of org.webharvest.runtime.processors.HttpProcessor.run()

                for (int i = 0; i < defs.length; i++) {
                    HttpProcessor processor = (HttpProcessor) ProcessorResolver.createProcessor(
                            defs[i], scraper.getConfiguration(), scraper);
                    String documentURI = ((HttpDef) processor.getElementDef()).getUrl();
                    HttpInfo httpInfo = (HttpInfo) context.get("http");
                    Variable content = processor.run(scraper, context);

                    try {
                        // A document URI and a charset should be provided.
                        Object inputSource = inputSourceConstructor.newInstance(
                                new Object[]{new ByteArrayInputStream(content.toBinary()), documentURI, httpInfo.charset});
View Full Code Here

Examples of org.webslinger.template.CompiledTemplate.run()

    }

    public static void runTemplate(String language, String name, Writer writer, Map<String, Object> context) throws IOException {
        FileObject file = CommonsVfsContainer.resolveFile(name);
        CompiledTemplate template = getTemplate(language, file);
        template.run(file, writer, context);
    }

    public static CompiledTemplate getTemplate(String language, FileObject file) throws IOException {
        return getTemplateManager().compileTemplate(language, "top", 0, 0, file);
    }
View Full Code Here

Examples of org.woped.file.OLDPNMLImport2.run()

        // Loop over all selected files to analyze them
        for(File f:filesToCheck){
          write.write(f.getName());
          if(pr.run(new FileInputStream(f),false))
            edit = pr.getEditor()[0];
          else if(oldpr.run(new FileInputStream(f),false))
            edit = oldpr.getEditor()[0];
          else continue;
          MetricsUIRequestHandler ui = new MetricsUIRequestHandler(edit);
          for(String metric:metricsList){
            StringPair result;
View Full Code Here

Examples of org.woped.file.PNMLImport.run()

        write.write("\r\n");
       
        // Loop over all selected files to analyze them
        for(File f:filesToCheck){
          write.write(f.getName());
          if(pr.run(new FileInputStream(f),false))
            edit = pr.getEditor()[0];
          else if(oldpr.run(new FileInputStream(f),false))
            edit = oldpr.getEditor()[0];
          else continue;
          MetricsUIRequestHandler ui = new MetricsUIRequestHandler(edit);
View Full Code Here

Examples of org.xbill.DNS.Lookup.run()

              //�ؿ�ר��
              String email = mail.getRecipients(RecipientType.TO)[0].toString();
              String domain_name = parseDomain(email);
              //TODO: ʵ�������Ļ���,�ӿ�����ٶ�
              Lookup lookup = new Lookup(domain_name, Type.MX);
                  lookup.run();
              if (lookup.getResult() != Lookup.SUCCESSFUL){
                log("ERROR: " + lookup.getErrorString() + " when lookup MX record of " + email);
                continue;
              }
              Record[] answers = lookup.getAnswers();
View Full Code Here

Examples of org.xbill.DNS.ZoneTransferIn.run()

    try {
      ZoneTransferIn xfrin = ZoneTransferIn.newAXFR(this.secondaryZone.getZoneName(), this.secondaryZone.getRemoteServerAddress(), null);
      xfrin.setDClass(DClass.value(this.secondaryZone.getDclass()));
      xfrin.setTimeout(axfrTimeout);

      List<?> records = xfrin.run();

      if (!xfrin.isAXFR()) {

        log.warn("Unable to transfer zone " + this.secondaryZone.getZoneName() + " from server " + this.secondaryZone.getRemoteServerAddress() + ", response is not a valid AXFR!");
View Full Code Here

Examples of org.xlightweb.server.HttpServer.run()

   
    String basePath = ChatExample.class.getResource("").getFile();
    rootCtx.addHandler("/chat/*", new FileServiceRequestHandler(basePath, true));
   
    HttpServer server = new HttpServer(9090, rootCtx);
    server.run();
  }

 
  public static final class MessageBroker {
   
View Full Code Here

Examples of org.xmlBlaster.contrib.replication.I_ReplSlave.run()

                  if (slaveSessionName.equals(cascadeSlaveSessionName))
                     throw new Exception(ret + " did fail since having the same slave '" + slaveSessionName + "' for both replications would result in a loop");
                     // return "error: " + ret + " did fail since having the same slave '" + slaveSessionName + "' for both replications would result in a loop";
               }
              
               boolean isOkToStart = slave.run(individualInfo, dbWatcherSessionId, cascadeReplicationPrefix, cascadeSlaveSessionName, false);
               if (isOkToStart == false) {
                  ret += " did fail since your status is '" + slave.getStatus() + "'. Please invoke first 'Cancel Update'";
                  throw new Exception(ret);
                  // return "error: " + ret; // don't throw an exception here since MX4J seems to loose exception msg.
               }
View Full Code Here

Examples of org.xmlBlaster.util.Execute.run()

            if (closeCmd != null) {
               String tmpFilename = dumperFilename + format.format(count);
               String cmd = closeCmd + " " + tmpFilename;
               String[] args = ReplaceVariable.toArray(cmd, " ");
               Execute execute = new Execute(args, null, 10L);
               execute.run(); // blocks until finished
               if (execute.getExitValue() != 0) {
                  throw new Exception("Exception occured on executing '" + cmd + "");
               }
            }
            // make a backup
View Full Code Here

Examples of org.xmlBlaster.util.dispatch.DispatchWorker.run()

      // this is a sync call (all in the same thread)
      entry.setWantReturnObject(true);
      DispatchWorker worker = new DispatchWorker(this.global, sub.getSessionInfo().getDispatchManager());
      ArrayList list = new ArrayList();
      list.add(entry);
      worker.run(list);     
      return (UpdateReturnQosServer)entry.getReturnObj();
   }

   /**
    * @see org.xmlBlaster.engine.I_SubscriptionListener#getPriority()
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.