Package org.apache.synapse.config

Examples of org.apache.synapse.config.SynapseConfiguration.addEndpoint()


                getResourceAsStream(proxyFileName));
        proxy.setFileName(proxyFileName);

        SynapseConfiguration synapseConfig = synapseConfigSvc.getSynapseConfiguration();
        synapseConfig.addSequence(seq.getName(), seq);
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);
        synapseConfig.addProxyService(proxy.getName(), proxy);

        MediationPersistenceManager pm = getMediationPersistenceManager();
        pm.saveItem(seq.getName(), ServiceBusConstants.ITEM_TYPE_SEQUENCE);
        pm.saveItem(endpoint.getName(), ServiceBusConstants.ITEM_TYPE_ENDPOINT);
View Full Code Here


        synapseConfig.addEntry(entry.getKey(), entry);

        // Add an endpoint which is dependent on the local entry 'sec_policy'
        Endpoint endpoint = createEndpoint("endpoint");
        initEndpoint(endpoint, entry.getKey());
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);

        // Test
        assertDependency(ConfigurationObject.TYPE_ENTRY, entry.getKey(), endpoint.getName());

        // Add a sequence which is dependent on the endpoint
View Full Code Here

        Entry entry = createEntry("sec_policy");
        synapseConfig.addEntry(entry.getKey(), entry);

        Endpoint endpoint = createEndpoint("endpoint");
        initEndpoint(endpoint, entry.getKey());
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);

        SequenceMediator seq1 = createSequence("seq1", null);
        SendMediator send = new SendMediator();
        IndirectEndpoint endpointRef = new IndirectEndpoint();
        endpointRef.setKey(endpoint.getName());
View Full Code Here

        synapseConfig.addEntry(entry1.getKey(), entry1);
        synapseConfig.addEntry(entry2.getKey(), entry2);

        Endpoint endpoint = createEndpoint("endpoint");
        initEndpoint(endpoint, entry1.getKey());
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);

        assertDependency(ConfigurationObject.TYPE_ENTRY, entry1.getKey(), endpoint.getName());
        synapseConfig.removeEndpoint(endpoint.getName());
        initEndpoint(endpoint, entry2.getKey());
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);
View Full Code Here

        synapseConfig.addEndpoint(endpoint.getName(), endpoint);

        assertDependency(ConfigurationObject.TYPE_ENTRY, entry1.getKey(), endpoint.getName());
        synapseConfig.removeEndpoint(endpoint.getName());
        initEndpoint(endpoint, entry2.getKey());
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);
        assertNoDependency(ConfigurationObject.TYPE_ENTRY, entry1.getKey());
        assertDependency(ConfigurationObject.TYPE_ENTRY, entry2.getKey(), endpoint.getName());

        Endpoint endpoint2 = createEndpoint("endpoint2");
        initEndpoint(endpoint2, null);
View Full Code Here

        assertNoDependency(ConfigurationObject.TYPE_ENTRY, entry1.getKey());
        assertDependency(ConfigurationObject.TYPE_ENTRY, entry2.getKey(), endpoint.getName());

        Endpoint endpoint2 = createEndpoint("endpoint2");
        initEndpoint(endpoint2, null);
        synapseConfig.addEndpoint(endpoint2.getName(), endpoint2);

        SequenceMediator seq1 = createSequence("seq1", null);
        SendMediator send = new SendMediator();
        IndirectEndpoint endpointRef = new IndirectEndpoint();
        endpointRef.setKey(endpoint.getName());
View Full Code Here

    public void testInactiveDependency() {
        SynapseConfiguration synapseConfig = createSynapseConfig();

        Endpoint endpoint = createEndpoint("endpoint");
        initEndpoint(endpoint, null);
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);

        SequenceMediator sequence = createSequence("sequence", null);
        SendMediator send = new SendMediator();
        IndirectEndpoint target = new IndirectEndpoint();
        target.setKey(endpoint.getName());
View Full Code Here

        Endpoint endpoint1 = createEndpoint("foo");
        initEndpoint(endpoint1, null);
        Endpoint endpoint2 = createEndpoint("bar");
        initEndpoint(endpoint2, null);

        synapseConfig.addEndpoint(endpoint1.getName(), endpoint1);
        synapseConfig.addEndpoint(endpoint2.getName(), endpoint2);

        LoadbalanceEndpoint lb = new LoadbalanceEndpoint();
        lb.setName("lb");
        lb.setDefinition(new EndpointDefinition());
View Full Code Here

        initEndpoint(endpoint1, null);
        Endpoint endpoint2 = createEndpoint("bar");
        initEndpoint(endpoint2, null);

        synapseConfig.addEndpoint(endpoint1.getName(), endpoint1);
        synapseConfig.addEndpoint(endpoint2.getName(), endpoint2);

        LoadbalanceEndpoint lb = new LoadbalanceEndpoint();
        lb.setName("lb");
        lb.setDefinition(new EndpointDefinition());
View Full Code Here

        children.add(child1);
        children.add(child2);
        children.add(child3);
        lb.setChildren(children);

        synapseConfig.addEndpoint(lb.getName(), lb);
        assertDependency(ConfigurationObject.TYPE_ENDPOINT, child1.getKey(), lb.getName());
        assertDependency(ConfigurationObject.TYPE_ENDPOINT, child2.getKey(), lb.getName());
        assertNoDependency(ConfigurationObject.TYPE_ENDPOINT, child3.getName());
    }
}
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.