Examples of cancel()


Examples of com.stripe.model.Transfer.cancel()

  }

  @Test(expected=InvalidRequestException.class)
  public void testTransferCancel() throws StripeException {
    Transfer createdTransfer = Transfer.create(getTransferParams());
    createdTransfer.cancel();

    // post-condition: we expect an InvalidRequestException here (caught by JUnit),
    // because in test mode, transfers are automatically sent
  }
View Full Code Here

Examples of com.sun.grid.jgrid.Job.cancel()

     
      throw new CommandFailedException (jobId, "No such job");
    }
    else if (job.getState () == Job.RUNNING) {
      try {
        job.cancel ();
   
        log.fine ("Job has been canceled: " + jobId);
      }
      catch (NotInterruptableException e) {
        log.finer ("Cancel command failed for job " + jobId + ": Job cannot be interrupted");
View Full Code Here

Examples of com.sun.jini.thread.RetryTask.cancel()

        /* Cancel/remove pending tasks from the task manager and terminate */
        if(discoveryTaskMgr != null) {
            ArrayList pendingTasks = discoveryTaskMgr.getPending();
            for(int i=0;i<pendingTasks.size();i++) {
                RetryTask pendingTask = (RetryTask)pendingTasks.get(i);
                pendingTask.cancel();//cancel wakeup ticket
                discoveryTaskMgr.remove(pendingTask);//remove from task mgr
            }//end loop
            discoveryTaskMgr.terminate();//interrupt all active tasks
            discoveryTaskMgr = null;
            discoveryWakeupMgr = null;
View Full Code Here

Examples of com.sun.sgs.app.PeriodicTaskHandle.cancel()

                        fail("Did not expect Exception: " + e);
                    }
                    try {
                        PeriodicTaskHandle handle =
                            taskService.schedulePeriodicTask(task, 100L, 100L);
                        handle.cancel();
                    } catch (Exception e) {
                         fail("Did not expect Exception: " + e);
                    }
                }
        }, taskOwner);
View Full Code Here

Examples of com.sun.sgs.kernel.RecurringTaskHandle.cancel()

            taskScheduler.scheduleRecurringTask(new IncrementRunner(),
                                                taskOwner,
                                                System.currentTimeMillis() + 50,
                                                50);
        handle.start();
        handle.cancel();
        Thread.sleep(200L);
        assertEquals(0, taskCount);
    }

    @Test public void startSleepAndCancelRecurringTask() throws Exception {
View Full Code Here

Examples of com.sun.sgs.kernel.TaskReservation.cancel()

        public void cancelAfterUseReservedTaskDelayed() throws Exception {
        TaskReservation reservation =
            taskScheduler.reserveTask(testTask, taskOwner,
                                      System.currentTimeMillis() + 50);
        reservation.use();
        reservation.cancel();
    }

    @Test (expected=IllegalStateException.class)
        public void useAfterCancelReservedTask() throws Exception {
        TaskReservation reservation =
View Full Code Here

Examples of com.sun.star.util.XCancellable.cancel()

    private void closeDialog() {
        XCancellable canc = (XCancellable) UnoRuntime.queryInterface(
                XCancellable.class, tEnv.getTestObject());
        if (canc != null) {
            log.println("Cancelling Dialog");
            canc.cancel();
        } else {
            this.disposeEnvironment();
        }
       
        long st = System.currentTimeMillis();
View Full Code Here

Examples of com.sun.xml.ws.security.secconv.WSSCContract.cancel()

                List<PolicyAssertion> policies = getOutBoundSCP(packet.getMessage());
                retAction = wsscVer.getSCTRenewResponseAction();
                rstr =  scContract.renew(rst, ictx,(SecureConversationToken)policies.get(0));
            } else if (requestType.toString().equals(wsTrustVer.getCancelRequestTypeURI())) {
                retAction = wsscVer.getSCTCancelResponseAction();
                rstr =  scContract.cancel(rst, ictx);
            } else {
                log.log(Level.SEVERE,
                        LogStringsMessages.WSITPVD_0045_UNSUPPORTED_OPERATION_EXCEPTION(requestType));
                throw new UnsupportedOperationException(
                        LogStringsMessages.WSITPVD_0045_UNSUPPORTED_OPERATION_EXCEPTION(requestType));
View Full Code Here

Examples of com.taobao.zeus.jobs.Job.cancel()

  public void cancelDebugJob(String debugId) {
    Job job = context.getDebugRunnings().get(debugId);
    if (job == null) {
      throw new RuntimeException("任务已经不存在");
    }
    job.cancel();
    context.getDebugRunnings().remove(debugId);

    DebugHistory his = job.getJobContext().getDebugHistory();
    his.setEndTime(new Date());
    his.setStatus(com.taobao.zeus.model.JobStatus.Status.FAILED);
View Full Code Here

Examples of com.xeiam.xchange.coinsetter.service.polling.CoinsetterOrderServiceRaw.cancel()

      log.info("order {}: {}", order.getUuid(), order.getStage());
    }

    // Cancel order
    log.info("Cancelling order...");
    orderResponse = orderService.cancel(clientSession.getUuid(), orderResponse.getUuid());
    log.info("cancel order response: {}", orderResponse);

    clientSessionService.logout(clientSession.getUuid());
  }
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.