Examples of Executor


Examples of org.apache.http.client.fluent.Executor

    @Test
    public void testAuthenticationWithAuthenticableAndEmptyContext() throws Exception {
        UserCredentialsTransportAuthenticationProvider authenticationHandler = new UserCredentialsTransportAuthenticationProvider(
                "foo", "bar");
        Executor authenticable = Executor.newInstance();
        TransportAuthenticationContext context = new TransportAuthenticationContext();
        try {
            authenticationHandler.authenticate(authenticable, context);
            fail("could not authenticate with an empty context");
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.http.client.fluent.Executor

    @Test
    public void testAuthenticationWithAuthenticableAndCorrectContext() throws Exception {
        UserCredentialsTransportAuthenticationProvider authenticationHandler = new UserCredentialsTransportAuthenticationProvider(
                "foo", "bar");
        Executor authenticable = Executor.newInstance();
        TransportAuthenticationContext context = new TransportAuthenticationContext();
        context.addAttribute("endpoint", new ReplicationEndpoint("http://www.apache.org"));
        authenticationHandler.authenticate(authenticable, context);
    }
View Full Code Here

Examples of org.apache.ibatis.executor.Executor

        throw new SessionException("Configuration does not include an environment with a DataSource, so session cannot be created unless a connection is passed in.");
      }
      Connection connection = dataSource.getConnection();
      connection = wrapConnection(connection);
      Transaction tx = transactionFactory.newTransaction(connection, autoCommit);
      Executor executor = configuration.newExecutor(tx, execType);
      return new DefaultSqlSession(configuration, executor, autoCommit);
    } catch (SQLException e) {
      throw ExceptionFactory.wrapException("Error opening session.  Cause: " + e, e);
    }
  }
View Full Code Here

Examples of org.apache.ibatis.executor.Executor

        // or databases won't support transactions
        autoCommit = true;
      }
      connection = wrapConnection(connection);
      Transaction tx = transactionFactory.newTransaction(connection, autoCommit);
      Executor executor = configuration.newExecutor(tx, execType);
      return new DefaultSqlSession(configuration, executor, autoCommit);
    } catch (Exception e) {
      throw ExceptionFactory.wrapException("Error opening session.  Cause: " + e, e);
    }
  }
View Full Code Here

Examples of org.apache.servicemix.executors.Executor

        return getService() + "#" + getEndpoint();
    }

    public synchronized void start() throws Exception {
        if (bootstrapContext == null) {
            Executor executor = getServiceUnit().getComponent().getExecutor();
            WorkManager wm = new WorkManagerWrapper(executor);
            bootstrapContext = new SimpleBootstrapContext(wm);
        }
        resourceAdapter.start(bootstrapContext);
        activationSpec.setResourceAdapter(resourceAdapter);
View Full Code Here

Examples of org.apache.wicket.protocol.ws.concurrent.Executor

  private void process(final Application application, final Collection<IWebSocketConnection> wsConnections,
                       final IWebSocketPushMessage message)
  {
    IWebSocketSettings webSocketSettings = IWebSocketSettings.Holder.get(application);
    Executor executor = webSocketSettings.getWebSocketPushMessageExecutor();
    for (final IWebSocketConnection wsConnection : wsConnections)
    {
      executor.run(new Runnable()
      {
        @Override
        public void run()
        {
          wsConnection.sendMessage(message);
View Full Code Here

Examples of org.lilypondbeans.util.Executor

            }
            pdfFileName = out + "/" + o.getPrimaryFile().getName() + ".pdf";
            midiFileName = out + "/" + o.getPrimaryFile().getName() + ".mid";

            LILY_DIR = LilyOptions.getLilypondDir();
            Executor exe = new Executor();

            File folder = new File(LILY_DIR + "/usr/bin");
            if (!folder.exists()) {
                JOptionPane.showMessageDialog(new JFrame(), "LilyPond Directory " + LILY_DIR + "/usr/bin not found");
                return;
            }
            //  if (System.getProperty("os.name").equals("Linux")) {
            //  exe.execute("lilypond", folder, new String[]{"--pdf", "--output=" + out, lyFileName}, preRun(), postRun());
            //   } else {
            exe.execute("lilypond", folder, new String[]{"--pdf", "--output=\"" + out + "\"", "\"" + lyFileName + "\""}, preRun(), postRun());
            // }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of org.opensolaris.opengrok.util.Executor

        if (repo!=null && !repo.isEmpty())
        {
            argv.add("-p"+repo);
        }

        return new Executor(argv, new File(getDirectoryName()));
    }
View Full Code Here

Examples of org.soybeanMilk.core.Executor

  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "mars");
    os.set("helloRepeat", 3);
   
    printDiv();
    executor.execute("helloActionXml", os);
   
    printDiv();
    executor.execute("helloActionStatement", os);
   
    printDiv();
    executor.execute("testJavaSyntax", os);
   
    printDiv();
    executor.execute("testAfterBefore", os);
   
    printDiv();
    executor.execute("testException", os);
   
    printDiv();
    executor.execute("", os);
   
    printDiv();
    executor.execute("testRefToEmptyNameAction", os);
  }
View Full Code Here

Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.util.Executor

     */
    public boolean validateExuberantCtags() {
        if (exuberantCtagsAvailable != null) {
            return exuberantCtagsAvailable;
        }
        Executor executor = new Executor(new String[]{getCtags(), "--version"});
        executor.exec(false);
        String output = executor.getOutputString();

        exuberantCtagsAvailable = !(output == null || !output.contains("Exuberant Ctags"));

        return exuberantCtagsAvailable;
    }
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.