Examples of sendSync()


Examples of co.paralleluniverse.actors.Actor.sendSync()

        @Override
        public void sendSync(Message message) throws SuspendExecution {
            final Actor a = getActor();
            if (a != null)
                a.sendSync(message);
        }
    }
}

Examples of co.paralleluniverse.actors.ActorRef.sendSync()

        @Override
        public void sendSync(Message message) throws SuspendExecution {
            final ActorRef a = getActor();
            if (a != null)
                a.sendSync(message);
        }

        @Override
        public boolean send(Message message, long timeout, TimeUnit unit) throws SuspendExecution, InterruptedException {
            final ActorRef a = getActor();

Examples of javax.jbi.messaging.DeliveryChannel.sendSync()

            DeliveryChannel deliveryChannel = componentContext.getDeliveryChannel();
            MessageExchangeFactory exchangeFactory = deliveryChannel.createExchangeFactory();
            MessageExchange messageExchange = binding.makeJbiMessageExchange(exchange, exchangeFactory, mep);

            URIResolver.configureExchange(messageExchange, componentContext, destinationUri);
            deliveryChannel.sendSync(messageExchange);

            if (messageExchange.getStatus() == ExchangeStatus.ERROR) {
                exchange.setException(messageExchange.getError());
            } else if (messageExchange.getStatus() == ExchangeStatus.ACTIVE) {
                if (messageExchange.getFault() != null) {

Examples of javax.jbi.messaging.DeliveryChannel.sendSync()

            // TODO: set endpoint
            me.setOperation(operationName);
            NormalizedMessage nm = me.createMessage();
            me.setMessage(nm, "in");
            nm.setContent(inputSource);
            boolean res = channel.sendSync(me);
            if (!res) {
                throw new ActionSystemException("Timeout on sending message");
            }
            if (me.getStatus() == ExchangeStatus.ACTIVE) {
                if (me.getFault() != null) {

Examples of javax.jbi.messaging.DeliveryChannel.sendSync()

                    if (oldMsg != null) {
                        msg.setSecuritySubject(oldMsg.getSecuritySubject());
                    }
                }
                msg.setContent(getContent(context, message));
                if (!channel.sendSync(me)) {
                    throw new XFireException("Unable to send jbi exchange: sendSync returned false");
                }
                if (me.getStatus() == ExchangeStatus.ERROR) {
                    if (me.getError() != null) {
                        throw new XFireFault(me.getError(), XFireFault.RECEIVER);

Examples of org.apache.servicemix.client.DefaultServiceMixClient.sendSync()

        for (int i = 0; i < nbMsgs; i++) {
            InOnly me = client.createInOnlyExchange();
            me.setService(new QName("http://test", "entryPoint"));
            me.getInMessage().setContent(new StringSource(
                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.sendSync(me);
        }       
        ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace2")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace3")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace4")).getMessageList().assertMessagesReceived(2 * nbMsgs);
 

Examples of org.apache.servicemix.client.DefaultServiceMixClient.sendSync()

    public void testGroovy() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "groovy"));
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
                throw me.getError();
            } else {
                fail("Received ERROR status");

Examples of org.apache.servicemix.client.DefaultServiceMixClient.sendSync()

    public void testRuby() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "jruby"));
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
                throw me.getError();
            } else {
                fail("Received ERROR status");

Examples of org.apache.servicemix.client.DefaultServiceMixClient.sendSync()

            InOnly me = client.createInOnlyExchange();
            me.setService(new QName("urn:test", "service"));
            NormalizedMessage message = me.getInMessage();
            message.setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY, "test" + i + ".xml");
            message.setContent(new StringSource("<hello>world</hello>"));
            client.sendSync(me);
        }

        Receiver receiver = (Receiver) getBean("receiver");
        receiver.getMessageList().assertMessagesReceived(NUMBER);
    }

Examples of org.apache.servicemix.client.DefaultServiceMixClient.sendSync()

        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
    }

    protected void assertExchangeWorked(MessageExchange me) throws Exception {
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.