Examples of cancel()


Examples of org.apache.http.conn.ConnectionRequest.cancel()

        rewriteRequestURI(request, route);

        final ConnectionRequest connRequest = connManager.requestConnection(route, null);
        if (execAware != null) {
            if (execAware.isAborted()) {
                connRequest.cancel();
                throw new RequestAbortedException("Request aborted");
            } else {
                execAware.setCancellable(connRequest);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.state.SessionItemStateManager.cancel()

            throw new RepositoryException(
                    "Unable to update item: " + this, e);
        } finally {
            if (!succeeded) {
                // update operation failed, cancel all modifications
                stateMgr.cancel();

                // JCR-288: if an exception has been thrown during
                // update() the transient changes have already been
                // applied by persistTransientItems() and we need to
                // restore transient state, i.e. undo the effect of
View Full Code Here

Examples of org.apache.jackrabbit.core.state.UpdatableItemStateManager.cancel()

            } catch (ItemStateException e) {
                throw new RepositoryException("Error while creating lock.", e);
            } finally {
                if (!success) {
                    // failed to set lock meta-data content, cleanup
                    stateMgr.cancel();
                    try {
                        unlock(node);
                    } catch (RepositoryException e) {
                        // cleanup failed
                        log.error("error while cleaning up after failed lock attempt", e);
View Full Code Here

Examples of org.apache.jena.atlas.lib.AlarmClock.cancel()

        AlarmClock alarmClock = new AlarmClock() ;
        assertEquals(0, alarmClock.getCount()) ;
        // Very long - never happens.
        Pingback<?> ping = alarmClock.add(callback, 10000000) ;
        assertEquals(1, alarmClock.getCount()) ;
        alarmClock.cancel(ping) ;
        assertEquals(0, alarmClock.getCount()) ;
    }
   
    @Test public void alarm_02()
    {
View Full Code Here

Examples of org.apache.juddi.subscription.SubscriptionNotifier.cancel()

  @Test
  public void testGetSubscriptionResults()
    throws ConfigurationException, MalformedURLException, DispositionReportFaultMessage, DatatypeConfigurationException
  {
    SubscriptionNotifier notifier = new SubscriptionNotifier();
    notifier.cancel();
    Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
    Assert.assertEquals(1, subscriptions.size());
    Subscription subscription = subscriptions.iterator().next();
    GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date());
    getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
View Full Code Here

Examples of org.apache.karaf.eik.ui.internal.KarafRemoteShellConnectJob.cancel()

                    for (final DebugEvent event : events) {
                        if (   process != null
                            && process.equals(event.getSource())
                            && event.getKind() == DebugEvent.TERMINATE)
                        {
                            job.cancel();
                        }
                    }
                }
            });
View Full Code Here

Examples of org.apache.mina.core.future.ConnectFuture.cancel()

    ConnectFuture future = connector.connect(
      new InetSocketAddress( address, port ),
      new VMIDSlotInitializer<ConnectFuture>( args, reconnect_token, container,
        attachment, original_vmid ) );
    if ( !future.await( timeout_ns, TimeUnit.NANOSECONDS ) ) {
      future.cancel();

      // TODO: better way to do this??
      // HACK ALERT: In situations where the connection times out, there can be a
      //             file descriptor leak because MINA doesn't seem to close the
      //             handler (SocketChannel) when the ConnectFuture is canceled.
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.ActivityRecovery.cancel()

                ActivityRecovery recovery = importChannel(channel, ActivityRecovery.class);
                __log.info("ActivityRecovery: Recovering activity " + activityId + " with action " + action +
                        " on channel " + recovery);
                if (recovery != null) {
                    if ("cancel".equals(action))
                        recovery.cancel();
                    else if ("retry".equals(action))
                        recovery.retry();
                    else if ("fault".equals(action))
                        recovery.fault(fault);
                }
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.ActivityRecoveryChannel.cancel()

                ActivityRecoveryChannel recovery = importChannel(channel, ActivityRecoveryChannel.class);
                __log.info("ActivityRecovery: Recovering activity " + activityId + " with action " + action +
                        " on channel " + recovery);
                if (recovery != null) {
                    if ("cancel".equals(action))
                        recovery.cancel();
                    else if ("retry".equals(action))
                        recovery.retry();
                    else if ("fault".equals(action))
                        recovery.fault(fault);
                }
View Full Code Here

Examples of org.apache.qpid.qmf2.agent.Subscription.cancel()

            String subscriptionId = item.getSubscriptionId();
System.out.println("Received cancellation request for " + subscriptionId);
            Subscription subscription = _subscriptions.get(subscriptionId);
            if (subscription != null)
            {
                subscription.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.