Examples of cancel()


Examples of org.apache.servicemix.nmr.api.internal.InternalExchange.cancel()

          }
      };
      thread.start();
      //let's sleep for a moment to make sure the thread has acquired the lock
      Thread.sleep(150);
      e.cancel();
      assertTrue("Exchange should have been cancelled", latch.await(1, TimeUnit.SECONDS));
      assertEquals(Status.Error, e.getStatus());
  }

    public static Map<String, Object> createMap(String... data) {
View Full Code Here

Examples of org.apache.servicemix.timers.Timer.cancel()

                    timeout = getTimeout(aggregation);
                }
            } else if (isRescheduleTimeouts()) {
                Timer t = timers.remove(correlationId);
                if (t != null) {
                    t.cancel();
                }
                timeout = getTimeout(aggregation);
            }
            // If the aggregation is not closed
            if (aggregation != null) {
View Full Code Here

Examples of org.apache.sshd.client.future.ConnectFuture.cancel()

      System.out.println("New SSH connection to " + connectionInfo.getHost());

      ConnectFuture connect = client.connect(connectionInfo.getSocketAddress());
      if (!connect.await(connectTimeout.getTotalMilliseconds())) {
        connect.cancel();
        throw new SshException("Timeout while waiting for SSH connection to " + connectionInfo.getHost());
      }

      this.sshClientSession = connect.getSession();
View Full Code Here

Examples of org.apache.sshd.client.future.DefaultConnectFuture.cancel()

        }
        final ConnectFuture connectFuture = new DefaultConnectFuture(null);
        connector.connect(address).addListener(new SshFutureListener<IoConnectFuture>() {
            public void operationComplete(IoConnectFuture future) {
                if (future.isCanceled()) {
                    connectFuture.cancel();
                } else if (future.getException() != null) {
                    connectFuture.setException(future.getException());
                } else {
                    ClientSessionImpl session = (ClientSessionImpl) AbstractSession.getSession(future.getSession());
                    connectFuture.setSession(session);
View Full Code Here

Examples of org.apache.sshd.common.io.IoConnectFuture.cancel()

        getConnector().connect(address).addListener(new IoFutureListener<ConnectFuture>() {
            public void operationComplete(ConnectFuture cf) {
                if (cf.getException() != null) {
                    future.setException(cf.getException());
                } else if (cf.isCanceled()) {
                    future.cancel();
                } else {
                    future.setSession(getSession(cf.getSession()));
                }
            }
        });
View Full Code Here

Examples of org.apache.twill.common.Cancellable.cancel()

    // Check it exists.
    Assert.assertTrue(serviceDiscovered.contains(discoverable));

    // Remove the service
    cancellable.cancel();

    // There should be no service.
    Assert.assertTrue(waitTillExpected(0, serviceDiscovered));

    Assert.assertFalse(serviceDiscovered.contains(discoverable));
View Full Code Here

Examples of org.archfirst.bfexch.domain.trading.order.Order.cancel()

        if (order == null) {
            logger.error("OrderCancelRequest: clOrdID {} not found", clOrdID);
            return;
        }

        order.cancel();
        if (order.getStatus() == OrderStatus.Canceled) {
            orderEventPublisher.publish(new OrderCanceled(order));
        }
        else {
            orderEventPublisher.publish(new OrderCancelRejected(order));
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.cancel()

                    @Override
                    public void onComplete(Continuation continuation) {
                        AtmosphereResourceImpl r = (AtmosphereResourceImpl) req.getAttribute(FrameworkConfig.ATMOSPHERE_RESOURCE);
                        if (r != null) {
                            try {
                                r.cancel();
                            } catch (IOException e) {
                            }
                        }
                    }
View Full Code Here

Examples of org.broad.igv.tools.FeatureSearcher.cancel()

        final ActionListener cancelListener = new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                FeatureTrackUtils.isSearching = false;
                searcher.cancel();
            }
        };

        final CancellableProgressDialog dialog = CancellableProgressDialog.showCancellableProgressDialog(IGV.getMainFrame(), "Searching...", cancelListener, true, monitor);
        dialog.getProgressBar().setIndeterminate(true);
View Full Code Here

Examples of org.bukkit.scheduler.BukkitTask.cancel()

    final BukkitTask task = scheduler.runTaskTimerAsynchronously(plugin, runnable, firstDelay, repeatDelay);
   
    return new TaskWrapper() {
      @Override
      public void cancel() {
        task.cancel();
      }
    };
  }
}
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.