Examples of suspend()


Examples of org.apache.camel.component.http.HttpConsumer.suspend()

        // now suspend jetty
        HttpConsumer consumer = (HttpConsumer) context.getRoute("route1").getConsumer();
        assertNotNull(consumer);

        // suspend
        consumer.suspend();

        try {
            template.requestBody(serverUri, "Moon", String.class);
            fail("Should throw exception");
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.camel.impl.DefaultCamelContext.suspend()

        });

        // traverse a litany of states
        camel.start();
        Thread.sleep(100);
        camel.suspend();
        Thread.sleep(100);
        camel.resume();
        Thread.sleep(100);
        camel.stop();
        Thread.sleep(100);
View Full Code Here

Examples of org.apache.cxf.continuations.Continuation.suspend()

                    throw new RuntimeException("Was already suspended");
                }
                Object userObject = "Fred".equals(name) ? "Ruby" : null;
                continuation.setObject(userObject);
                suspended = true;
                continuation.suspend(2000);
            } else {
                if (!suspended) {
                    throw new RuntimeException("Was not suspended yet");
                }
                if (continuation.isResumed()) {
View Full Code Here

Examples of org.apache.cxf.continuations.Continuation.suspend()

                       
                        // Now we don't set up the timeout value
                        LOG.trace("Suspending continuation of exchangeId: {}", camelExchange.getExchangeId());
                       
                        // The continuation could be called before the suspend is called
                        continuation.suspend(cxfEndpoint.getContinuationTimeout());

                        // use the asynchronous API to process the exchange
                        getAsyncProcessor().process(camelExchange, new AsyncCallback() {
                            public void done(boolean doneSync) {
                                // make sure the continuation resume will not be called before the suspend method in other thread
View Full Code Here

Examples of org.apache.cxf.jaxrs.impl.AsyncResponseImpl.suspend()

            }
            AsyncResponse asyncResponse = inMessage.get(AsyncResponse.class);
            if (asyncResponse != null) {
                inMessage.put(AsyncResponse.class, null);
                AsyncResponseImpl asyncImpl = (AsyncResponseImpl)asyncResponse;
                asyncImpl.suspend();
            }
            result = invoke(exchange, resourceObject, methodToInvoke, params);
        } catch (Fault ex) {
            return handleFault(ex, inMessage, cri, methodToInvoke);
        } finally {
View Full Code Here

Examples of org.apache.falcon.client.FalconClient.suspend()

            colo = getColo(colo);
            result = client.schedule(entityType, entityName, colo);
        } else if (optionsList.contains(SUSPEND_OPT)) {
            validateEntityName(entityName);
            colo = getColo(colo);
            result = client.suspend(entityType, entityName, colo);
        } else if (optionsList.contains(RESUME_OPT)) {
            validateEntityName(entityName);
            colo = getColo(colo);
            result = client.resume(entityType, entityName, colo);
        } else if (optionsList.contains(DELETE_OPT)) {
View Full Code Here

Examples of org.apache.ftpserver.FtpServer.suspend()

        if(req.getParameter("stop") != null) {
            server.stop();
        } else if(req.getParameter("resume") != null) {
            server.resume();
        } else if(req.getParameter("suspend") != null) {
            server.suspend();
        }
       
        resp.sendRedirect("/");
    }
View Full Code Here

Examples of org.apache.geronimo.transaction.ContainerTransactionContext.suspend()

        ConnectionInfo connectionInfo1 = makeConnectionInfo();
        transactionCachingInterceptor.getConnection(connectionInfo1);
        obtainedConnectionInfo = null;

        //start a second transaction
        transactionContext1.suspend();
        ContainerTransactionContext transactionContext2 = new ContainerTransactionContext(transactionManager);
        TransactionContext.setContext(transactionContext2);
        transactionContext2.begin();
        ConnectionInfo connectionInfo2 = makeConnectionInfo();
        transactionCachingInterceptor.getConnection(connectionInfo2);
View Full Code Here

Examples of org.apache.geronimo.transaction.UnspecifiedTransactionContext.suspend()

            if (ctx instanceof UnspecifiedTransactionContext == false) {
                throw new NotSupportedException("Previous Transaction has not been committed");
            }
            UnspecifiedTransactionContext oldContext = (UnspecifiedTransactionContext) ctx;
            BeanTransactionContext newContext = new BeanTransactionContext(txnManager, oldContext);
            oldContext.suspend();
            try {
                newContext.begin();
            } catch (SystemException e) {
                oldContext.resume();
                throw e;
View Full Code Here

Examples of org.apache.geronimo.transaction.context.ContainerTransactionContext.suspend()

        ConnectionInfo connectionInfo1 = makeConnectionInfo();
        transactionCachingInterceptor.getConnection(connectionInfo1);
        obtainedConnectionInfo = null;

        //start a second transaction
        transactionContext1.suspend();
        ContainerTransactionContext transactionContext2 = transactionContextManager.newContainerTransactionContext();
        ConnectionInfo connectionInfo2 = makeConnectionInfo();
        transactionCachingInterceptor.getConnection(connectionInfo2);
        assertTrue("Expected to get a second connection", obtainedConnectionInfo != null);
        assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
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.