Package org.switchyard.config.model.composite

Examples of org.switchyard.config.model.composite.CompositeReferenceModel


        _domain.registerService(config2.getServiceName(), new InOnlyService(), new MockHandler());
        _domain.registerServiceReference(config2.getServiceName(), new HelloInterface());
        _httpInbound2 = new InboundHandler(config2, _domain);
        _httpInbound2.start();

        CompositeReferenceModel compositeReference = composite.getReferences().get(0);
        HttpBindingModel configRef = (HttpBindingModel)compositeReference.getBindings().get(0);

        _httpOutbound = new OutboundHandler(configRef, null);
        _domain.registerService(configRef.getServiceName(), new HelloInterface(), _httpOutbound);
        _httpOutbound.start();

        compositeReference = composite.getReferences().get(1);
        HttpBindingModel configRef2 = (HttpBindingModel)compositeReference.getBindings().get(0);
        _httpOutbound2 = new OutboundHandler(configRef2, null);
        _domain.registerService(configRef2.getServiceName(), new HelloInterface(), _httpOutbound2);
        _httpOutbound2.start();

        compositeReference = composite.getReferences().get(2);
        HttpBindingModel configRef3 = (HttpBindingModel)compositeReference.getBindings().get(0);
        _httpOutbound3 = new OutboundHandler(configRef3, null);
        _domain.registerService(configRef3.getServiceName(), new HelloInterface(), _httpOutbound3);
        _httpOutbound3.start();

        compositeReference = composite.getReferences().get(3);
        HttpBindingModel configRef4 = (HttpBindingModel)compositeReference.getBindings().get(0);
        _httpOutbound4 = new OutboundHandler(configRef4, null);
        _domain.registerService(configRef4.getServiceName(), new HelloInterface(), _httpOutbound4);
        _httpOutbound4.start();

        compositeReference = composite.getReferences().get(4);
        HttpBindingModel configRef5 = (HttpBindingModel)compositeReference.getBindings().get(0);
        _httpOutbound5 = new OutboundHandler(configRef5, null);
        _domain.registerService(configRef5.getServiceName(), new HelloInterface(), _httpOutbound5);
        _httpOutbound5.start();
    }
View Full Code Here


    @SuppressWarnings("unchecked")
    protected T getFirstCamelReferenceBinding(final String config) throws Exception {
        final InputStream in = Classes.getResourceAsStream(config, getClass());
        final SwitchYardModel model = new ModelPuller<SwitchYardModel>().pull(in);
        final List<CompositeReferenceModel> services = model.getComposite().getReferences();
        final CompositeReferenceModel compositeServiceModel = services.get(0);
        final List<BindingModel> bindings = compositeServiceModel.getBindings();
        return (T) bindings.get(0);
    }
View Full Code Here

        _domain.registerService(_config.getServiceName(), new HelloRESTEasyInterface(), mockService);
        _domain.registerServiceReference(_config.getServiceName(), new HelloRESTEasyInterface());
        _restInbound = new InboundHandler(_config, _domain);

        CompositeReferenceModel compositeReference = composite.getReferences().get(0);
        _configRef = (RESTEasyBindingModel)compositeReference.getBindings().get(0);

        _restOutbound = new OutboundHandler(_configRef, null);
        // Massive hack for Test Runner. Register both a service and a reference binding.
        _domain.registerService(_configRef.getServiceName(), new HelloRESTEasyInterface(), _restOutbound);
        _domain.registerServiceReference(_configRef.getServiceName(), new HelloRESTEasyInterface());
View Full Code Here

            if (service != null) {
                _services.add(service);
            }
        }
        for (Configuration reference_config : config.getChildren(CompositeReferenceModel.REFERENCE)) {
            CompositeReferenceModel reference = (CompositeReferenceModel)readModel(reference_config);
            if (reference != null) {
                _references.add(reference);
            }
        }
        for (Configuration component_config : config.getChildren(ComponentModel.COMPONENT)) {
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.composite.CompositeReferenceModel

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.