Examples of execute()


Examples of org.springframework.richclient.command.ActionCommand.execute()

     * When commands are created, lookup the login command and execute it.
     */
    public void onCommandsCreated(ApplicationWindow window)
    {
        ActionCommand command = (ActionCommand) window.getCommandManager().getCommand("loginCommand", ActionCommand.class);
        command.execute();
    }
}
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommandExecutor.execute()

      if ( !( ( Guarded ) handler ).isEnabled() ) {
        return;
      }
    }

    handler.execute();
  }

  @Nullable
  private CommandGroup popupCommandGroup;
View Full Code Here

Examples of org.springframework.roo.addon.tailor.actions.Action.execute()

            final Action component = actionLocator.getAction(config
                    .getActionTypeId());
            if (component != null) {
                logInDevelopmentMode(Level.INFO,
                        "\tTailoring: " + component.getDescription(config));
                component.execute(commandTrafo, config);
            }
            else {
                logInDevelopmentMode(
                        Level.WARNING,
                        "\tTailoring: Couldn't find action '"
View Full Code Here

Examples of org.springframework.roo.shell.eclipse.Bootstrap.execute()

            public void run() {
              shellPage.getRooShell().append(commandString + StyledTextAppender.NL);
            }
          });

          bootstrap.execute(commandString);

          // Shutdown Roo
          bootstrap.shutdown();
          bootstrap = null;
          monitor.worked(4);
View Full Code Here

Examples of org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.execute()

    }

    private void sendMessagesToQueue() throws Exception {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.afterPropertiesSet();
        executor.execute(new Runnable() {
            public void run() {
                for (int i = 0; i < 20; i++) {
                    try {
                        // do some random sleep to simulate spread in user activity
                        Thread.sleep(new Random().nextInt(10));
View Full Code Here

Examples of org.springframework.transaction.support.TransactionOperations.execute()

    //and
    final TransactionOperations tx = new TransactionTemplate(
        new DataSourceTransactionManager(dataSource));

    //when
    final List<User> users = tx.execute(new TransactionCallback<List<User>>() {
      @Override
      public List<User> doInTransaction(TransactionStatus status) {
        final User user = new User("john", new Date(), 0, false);
        userRepository.save(user);
        return userRepository.findAll();
View Full Code Here

Examples of org.springframework.transaction.support.TransactionTemplate.execute()

    final List l = new ArrayList();
    l.add("test");
    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    tt.execute(new TransactionCallbackWithoutResult() {
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
        JcrTemplate template = new JcrTemplate(sf);
        template.save();
      }
View Full Code Here

Examples of org.springframework.util.exec.Execute.execute()

    executor.execute(new Runnable() {
      public void run() {
        try {
          running.countDown();
          int exit = execute.execute();
          finished.set(true);
          logger.info("Finished broker launcher process with exit code=" + exit);
          if (exit != 0) {
            throw new IllegalStateException("Could not start process." + errorHint);
          }
View Full Code Here

Examples of org.springframework.web.client.RestOperations.execute()

  @Test
  public void connectFailure() throws Exception {
    final HttpServerErrorException expected = new HttpServerErrorException(HttpStatus.INTERNAL_SERVER_ERROR);
    RestOperations restTemplate = mock(RestOperations.class);
    given(restTemplate.execute((URI) any(), eq(HttpMethod.POST), any(), any())).willThrow(expected);

    final CountDownLatch latch = new CountDownLatch(1);
    connect(restTemplate).addCallback(
        new ListenableFutureCallback<WebSocketSession>() {
          @Override
View Full Code Here

Examples of org.springframework.web.client.RestTemplate.execute()

    // Test with the in-JVM proxy configured
    HttpProxyConfiguration localProxy = new HttpProxyConfiguration("127.0.0.1", inJvmProxyPort);
    ClientHttpRequestFactory requestFactory = new RestUtil().createRequestFactory(localProxy, CCNG_API_SSL);

    restTemplate.setRequestFactory(requestFactory);
    restTemplate.execute(CCNG_API_URL + "/info", HttpMethod.GET, null, null);

    // then executes fine, and the jetty proxy indeed received one request
    assertEquals("expected network calls to make it through the inJvmProxy.", 1, nbInJvmProxyRcvReqs.get());
    nbInJvmProxyRcvReqs.set(0); //reset for next test
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.