Package org.apache.tuscany.sca.binding.notification.encoding

Examples of org.apache.tuscany.sca.binding.notification.encoding.NeighborBrokerConsumers


        XMLStreamReader reader = xif.createXMLStreamReader(new StringReader(testRemoveBroker));
        reader.next();
        RemoveBroker removeBroker = (RemoveBroker)der.decode(reader);
        Assert.assertEquals(removeBroker.getBrokerConsumerReference().getReference().getEndpointAddress().getAddress().toString(),
                            testUrl);
        NeighborBrokerConsumers neighborBrokerConsumers = removeBroker.getNeighborBrokerConsumers();
        Assert.assertEquals(neighborBrokerConsumers.getSequenceType(), "BrokerConsumers");
        Iterator<EndpointReference> it = neighborBrokerConsumers.getReferenceSequence().iterator();
        it.next();
        Assert.assertEquals(it.next().getEndpointAddress().getAddress().toString(), testUrl2);
       
        XMLOutputFactory xof = XMLOutputFactory.newInstance();
        StringWriter testWriter = new StringWriter();
View Full Code Here


               
                if (brokerList == null) {
                    throw new RuntimeException("No broker to remove for [" + notificationType + "]");
                }
               
                NeighborBrokerConsumers nbcs = rb.getNeighborBrokerConsumers();
                EndpointReference rbEpr = rb.getBrokerConsumerReference().getReference();
                if (nbcs != null && nbcs.getReferenceSequence() != null) {
                    List<Broker> neighborBrokers = new ArrayList<Broker>();
                    for (EndpointReference neighborBrokerConsumerEpr : nbcs.getReferenceSequence()) {
                        BrokerStruct neighborBrokerStruct = null;
                        URL neighborBrokerConsumerEprUrl = neighborBrokerConsumerEpr.getEndpointAddress().getAddress();
                        for (BrokerStruct brokerStruct : brokerList) {
                            if (brokerStruct.consumerUrl.equals(neighborBrokerConsumerEprUrl)) {
                                neighborBrokerStruct = brokerStruct;
View Full Code Here

            removeBroker = new RemoveBroker();
            BrokerConsumerReference brokerConsumerReference = new BrokerConsumerReference();
            brokerConsumerReference.setReference(brokerConsumerEpr);
            removeBroker.setBrokerConsumerReference(brokerConsumerReference);
            if (neighborBrokerConsumerEprs != null) {
                NeighborBrokerConsumers neighborBrokerConsumers = new NeighborBrokerConsumers();
                neighborBrokerConsumers.setReferenceSequence(neighborBrokerConsumerEprs);
                neighborBrokerConsumers.setSequenceType(Constants.BrokerConsumers);
                removeBroker.setNeighborBrokerConsumers(neighborBrokerConsumers);
            }
        }
View Full Code Here

               
                if (brokerList == null) {
                    throw new RuntimeException("No broker to remove for [" + notificationType + "]");
                }
               
                NeighborBrokerConsumers nbcs = rb.getNeighborBrokerConsumers();
                EndpointReference rbEpr = rb.getBrokerConsumerReference().getReference();
                if (nbcs != null && nbcs.getReferenceSequence() != null) {
                    List<Broker> neighborBrokers = new ArrayList<Broker>();
                    for (EndpointReference neighborBrokerConsumerEpr : nbcs.getReferenceSequence()) {
                        BrokerStruct neighborBrokerStruct = null;
                        URL neighborBrokerConsumerEprUrl = neighborBrokerConsumerEpr.getEndpointAddress().getAddress();
                        for (BrokerStruct brokerStruct : brokerList) {
                            if (brokerStruct.consumerUrl.equals(neighborBrokerConsumerEprUrl)) {
                                neighborBrokerStruct = brokerStruct;
View Full Code Here

            removeBroker = new RemoveBroker();
            BrokerConsumerReference brokerConsumerReference = new BrokerConsumerReference();
            brokerConsumerReference.setReference(brokerConsumerEpr);
            removeBroker.setBrokerConsumerReference(brokerConsumerReference);
            if (neighborBrokerConsumerEprs != null) {
                NeighborBrokerConsumers neighborBrokerConsumers = new NeighborBrokerConsumers();
                neighborBrokerConsumers.setReferenceSequence(neighborBrokerConsumerEprs);
                neighborBrokerConsumers.setSequenceType(Constants.BrokerConsumers);
                removeBroker.setNeighborBrokerConsumers(neighborBrokerConsumers);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.notification.encoding.NeighborBrokerConsumers

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.