Package org.switchyard.config.model.composite

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


            _endpointPublisher.start();
        } catch (Exception ex) {
            SCALogger.ROOT_LOGGER.failedToStartRemoteEndpointListenerForSCAEndpoints(ex);
        }
       
        SCABindingModel scab = (SCABindingModel)config;
        if (scab.isServiceBinding()) {
            return new SCAEndpoint(scab, super.getServiceDomain(), _endpointPublisher, _registry);
        } else {
            if ((scab.getTarget() == null) && (scab.getTargetNamespace() == null)) {
                throw SCAMessages.MESSAGES.invalidSCABindingForReferenceTargetServiceOrNamespaceMustBeSpecified();
            }
            return new SCAInvoker(scab, _registry)
                        .setDisableRemoteTransaction(_disableRemoteTransaction);
        }
View Full Code Here


   
    @Test
    public void testBindingActivationWithNullTargetAndNamespace() throws Exception {
        activator.setEndpointPublisher(new NOPEndpointPublisher());
       
        SCABindingModel scab = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri());
        scab.setClustered(true)
            .setLoadBalance("RoundRobin")
            .setTarget(null)
            .setTargetNamespace(null);
       
        try {
View Full Code Here

    public void testCreate() throws Exception {
        final String TARGET = "foo";
        final String TARGET_NS = "urn:bar";
        final String STRATEGY = "RoundRobin";
       
        SCABindingModel scab = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri());
        scab.setClustered(true)
            .setLoadBalance(STRATEGY)
            .setTarget(TARGET)
            .setTargetNamespace(TARGET_NS);
       
       Assert.assertEquals(STRATEGY, scab.getLoadBalance());
       Assert.assertEquals(TARGET, scab.getTarget());
       Assert.assertEquals(TARGET_NS, scab.getTargetNamespace());

       Assert.assertTrue(scab.isClustered());
       Assert.assertTrue(scab.hasTarget());
       Assert.assertTrue(scab.hasTargetNamespace());
       Assert.assertTrue(scab.isLoadBalanced());
    }
View Full Code Here

    }

    @Test
    public void testRead() throws Exception {
        SwitchYardModel switchyard = _puller.pull(SCA_BINDING_XML, getClass());
        SCABindingModel sb = (SCABindingModel)switchyard.getComposite().getServices().get(0).getBindings().get(0);
        SCABindingModel rb = (SCABindingModel)switchyard.getComposite().getReferences().get(0).getBindings().get(0);
       
        Assert.assertTrue(sb.isClustered());
        Assert.assertFalse(sb.isLoadBalanced());
        Assert.assertFalse(sb.hasTarget());
        Assert.assertFalse(sb.hasTargetNamespace());
       
        Assert.assertTrue(rb.isClustered());
        Assert.assertEquals("RoundRobin", rb.getLoadBalance());
        Assert.assertEquals("somethingElse", rb.getTarget());
        Assert.assertEquals("urn:another:uri", rb.getTargetNamespace());
    }
View Full Code Here

TOP

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

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.