Package org.apache.servicemix.nmr.api

Examples of org.apache.servicemix.nmr.api.Channel.send()


       
       
        org.apache.servicemix.nmr.api.Exchange messageExchange = control.createMock(org.apache.servicemix.nmr.api.Exchange.class);
        EasyMock.expect(messageExchange.getOut()).andReturn(normalizedMessage);
        message.put(org.apache.servicemix.nmr.api.Exchange.class, messageExchange);
        channel.send(messageExchange);
        EasyMock.replay(channel);
       
        NMRDestinationOutputStream jbiOS = new NMRDestinationOutputStream(message, channel);
       
        //Create array of more than what is in threshold in CachedOutputStream,
View Full Code Here


       
       
        org.apache.servicemix.nmr.api.Exchange messageExchange = control.createMock(org.apache.servicemix.nmr.api.Exchange.class);
        EasyMock.expect(messageExchange.getOut()).andReturn(normalizedMessage).times(2);
        message.put(org.apache.servicemix.nmr.api.Exchange.class, messageExchange);
        channel.send(messageExchange);
        EasyMock.replay(channel);
       
        NMRDestinationOutputStream jbiOS = new NMRDestinationOutputStream(message, new MessageImpl(), channel);
       
        //Create array of more than what is in threshold in CachedOutputStream,
View Full Code Here

                assertNotNull(onBefalfsubject);
                assertEquals(onBefalfsubject, receivedSubject);
            }
        };
        destination.setMessageObserver(observer);
        channel.send(exchange);      
        Thread.sleep(2000);
        assertNotNull(inMessage);
    }
}
View Full Code Here

       
       
        org.apache.servicemix.nmr.api.Exchange messageExchange = control.createMock(org.apache.servicemix.nmr.api.Exchange.class);
        EasyMock.expect(messageExchange.getOut()).andReturn(normalizedMessage).times(2);
        message.put(org.apache.servicemix.nmr.api.Exchange.class, messageExchange);
        channel.send(messageExchange);
        EasyMock.replay(channel);
       
        NMRDestinationOutputStream jbiOS = new NMRDestinationOutputStream(message, new MessageImpl(), channel);
       
        //Create array of more than what is in threshold in CachedOutputStream,
View Full Code Here

                assertNotNull(onBefalfsubject);
                assertEquals(onBefalfsubject, receivedSubject);
            }
        };
        destination.setMessageObserver(observer);
        channel.send(exchange);      
        Thread.sleep(2000);
        assertNotNull(inMessage);
    }
}
View Full Code Here

        exchange.getIn().setBody(new StringSource("<hello/>"));
        exchange.setTarget(nmr1.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, PROXY_ENDPOINT_NAME)));
        assertTrue("sendSync failed for exchange " + exchange.getId(), client.sendSync(exchange));
        assertEquals("bad status for exchange " + exchange.getId(), Status.Active, exchange.getStatus());
        exchange.setStatus(Status.Done);
        client.send(exchange);
        client.close();
        receiver.assertExchangesReceived(2, TIMEOUT);
    }

    public void testInOutAckTxNoRbInError() throws Exception {
View Full Code Here

        exchange.getIn().setBody(new StringSource("<hello/>"));
        exchange.setTarget(nmr1.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, PROXY_ENDPOINT_NAME)));
        assertTrue("sendSync failed for exchange " + exchange.getId(), client.sendSync(exchange));
        assertEquals("bad status for exchange " + exchange.getId(), Status.Active, exchange.getStatus());
        exchange.setStatus(Status.Done);
        client.send(exchange);
        client.close();
        receiver.assertExchangesReceived(2, TIMEOUT);
    }

    public void testInOutAckTxRbInError() throws Exception {
View Full Code Here

        exchange.getIn().setBody(new StringSource("<hello/>"));
        exchange.setTarget(nmr1.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, PROXY_ENDPOINT_NAME)));
        assertTrue("sendSync failed for exchange " + exchange.getId(), client.sendSync(exchange));
        assertEquals("bad status for exchange " + exchange.getId(), Status.Active, exchange.getStatus());
        exchange.setStatus(Status.Done);
        client.send(exchange);
        client.close();
        receiver.assertExchangesReceived(3, TIMEOUT);
    }

    protected void createRoute(Transacted transacted,
View Full Code Here

                            exchange.getIn().setBody(new StringSource("<hello/>"));
                            exchange.setTarget(nmr1.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, PROXY_ENDPOINT_NAME)));
                            client.sendSync(exchange);
                            assertEquals(Status.Active, exchange.getStatus());
                            exchange.setStatus(Status.Done);
                            client.send(exchange);
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    } finally {
                        lock.readLock().unlock();
View Full Code Here

       
       
        org.apache.servicemix.nmr.api.Exchange messageExchange = control.createMock(org.apache.servicemix.nmr.api.Exchange.class);
        EasyMock.expect(messageExchange.getOut()).andReturn(normalizedMessage).times(2);
        message.put(org.apache.servicemix.nmr.api.Exchange.class, messageExchange);
        channel.send(messageExchange);
        EasyMock.replay(channel);
       
        NMRDestinationOutputStream jbiOS = new NMRDestinationOutputStream(message, new MessageImpl(), channel);
       
        //Create array of more than what is in threshold in CachedOutputStream,
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.