Package org.apache.servicemix.nmr.core

Examples of org.apache.servicemix.nmr.core.ServiceMix


    }
   
    protected CamelContext createCamelContext() throws Exception {
        camelContext = SpringCamelContext.springCamelContext(applicationContext);
        smxComponent = new ServiceMixComponent();
        nmr = new ServiceMix();
        ((ServiceMix)nmr).init();
        smxComponent.setNmr(nmr);
        camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here


    }
   
    protected CamelContext createCamelContext() throws Exception {
      camelContext = SpringCamelContext.springCamelContext(applicationContext);
      smxComponent = new ServiceMixComponent();
      nmr = new ServiceMix();
      ((ServiceMix)nmr).init();
      smxComponent.setNmr(nmr);
      camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here

    }
   
    protected CamelContext createCamelContext() throws Exception {
      camelContext = SpringCamelContext.springCamelContext(applicationContext);
      smxComponent = new ServiceMixComponent();
      nmr = new ServiceMix();
      ((ServiceMix)nmr).init();
      smxComponent.setNmr(nmr);
      camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here

   
    protected CamelContext createCamelContext() throws Exception {
      camelContext = SpringCamelContext.springCamelContext(applicationContext);
     
      smxComponent = new ServiceMixComponent();
      nmr = new ServiceMix();
      ((ServiceMix)nmr).init();
      smxComponent.setNmr(nmr);
      camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here

      Bus bus = BusFactory.getDefaultBus();
      CamelTransportFactory camelTransportFactory = (CamelTransportFactory) bus.getExtension(ConduitInitiatorManager.class)
          .getConduitInitiator(CamelTransportFactory.TRANSPORT_ID);
      camelTransportFactory.setCamelContext(camelContext);
      smxComponent = new ServiceMixComponent();
      nmr = new ServiceMix();
      ((ServiceMix)nmr).init();
      smxComponent.setNmr(nmr);
      camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here

            return getContext().getDeliveryChannel();
        }
    }

    public void setUp() throws Exception {
        ServiceMix smx = new ServiceMix();
        smx.init();
        ComponentRegistryImpl reg = new ComponentRegistryImpl();
        reg.setNmr(smx);

        listener = new ExchangeCompletedListener();
        smx.getListenerRegistry().register(listener, new HashMap<String, Object>());
        // Create components
        provider = new TestComponent(new QName("provider"), "endpoint");
        consumer = new TestComponent(new QName("consumer"), "endpoint");
        // Register components
        reg.register(provider, ServiceHelper.createMap(ComponentRegistry.NAME, "provider"));
View Full Code Here

*/
public class IntegrationTest {

    @Test
    public void testJbiComponent() throws Exception {
        ServiceMix smx = new ServiceMix();
        smx.init();
        ComponentRegistryImpl reg = new ComponentRegistryImpl();
        reg.setNmr(smx);

        Endpoint tep = new Endpoint() {
            private Channel channel;
            public void setChannel(Channel channel) {
                this.channel = channel;
            }
            public void process(Exchange exchange) {
                if (exchange.getStatus() == Status.Active) {
                    exchange.setStatus(Status.Done);
                    channel.send(exchange);
                }
            }
        };
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Endpoint.SERVICE_NAME, new QName("target"));
        smx.getEndpointRegistry().register(tep, props);

        EIPComponent eip = new EIPComponent();
        WireTap ep = new WireTap();
        ep.setService(new QName("uri:foo", "bar"));
        ep.setEndpoint("ep");
        ep.setTarget(new ExchangeTarget());
        ep.getTarget().setService(new QName("target"));
        eip.setEndpoints(new EIPEndpoint[] { ep });
        eip.init(new ComponentContextImpl(reg, null, null, eip, new HashMap()));
        eip.getLifeCycle().start();

        Channel channel = smx.createChannel();
        Exchange e = channel.createExchange(Pattern.InOnly);
        e.getIn().setBody("<hello/>");
        e.setTarget(smx.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, "{uri:foo}bar:ep")));
        channel.sendSync(e);
    }
View Full Code Here

    private NMR nmr;

    @Before
    public void setUp() {
        ServiceMix smx = new ServiceMix();
        smx.init();
        nmr = smx;
    }
View Full Code Here

    @Override
    protected CamelContext createCamelContext() throws Exception {
      camelContext = SpringCamelContext.springCamelContext(applicationContext);
     
      smxComponent = new ServiceMixComponent();
      nmr = new ServiceMix();
      ((ServiceMix)nmr).init();
      smxComponent.setNmr(nmr);
      camelContext.addComponent("smx", smxComponent);
        return camelContext;
    }
View Full Code Here

        broker.start();
        return broker;
    }

    protected NMR createNmr() throws Exception {
        ServiceMix nmr = new ServiceMix();
        nmr.init();
        return nmr;
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.nmr.core.ServiceMix

Copyright © 2018 www.massapicom. 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.