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

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


            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(url);
            EndpointReference epr = new EndpointReference();
            epr.setEndpointAddress(epa);
            if (brokerID != null) {
                BrokerID cbi = new BrokerID();
                cbi.setID(brokerID);
                ReferenceProperties crp = new ReferenceProperties();
                crp.addProperty(cbi);
                epr.setReferenceProperties(crp);
            }
            ConsumerReference cr = new ConsumerReference();
View Full Code Here


        public WriteableConnectionOverride(URL brokerConsumerUrl, String brokerID) {
            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(brokerConsumerUrl);
            EndpointReference brokerConsumerEPR = new EndpointReference();
            brokerConsumerEPR.setEndpointAddress(epa);
            BrokerID cbi = new BrokerID();
            cbi.setID(brokerID);
            ReferenceProperties crp = new ReferenceProperties();
            crp.addProperty(cbi);
            brokerConsumerEPR.setReferenceProperties(crp);
            BrokerConsumerReference brokerConsumerReference = new BrokerConsumerReference();
            brokerConsumerReference.setReference(brokerConsumerEPR);
View Full Code Here

            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(url);
            EndpointReference epr = new EndpointReference();
            epr.setEndpointAddress(epa);
            if (brokerID != null) {
                BrokerID cbi = new BrokerID();
                cbi.setID(brokerID);
                ReferenceProperties crp = new ReferenceProperties();
                crp.addProperty(cbi);
                epr.setReferenceProperties(crp);
            }
            ConsumerReference cr = new ConsumerReference();
View Full Code Here

        public WriteableConnectionOverride(URL brokerConsumerUrl, String brokerID) {
            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(brokerConsumerUrl);
            EndpointReference brokerConsumerEPR = new EndpointReference();
            brokerConsumerEPR.setEndpointAddress(epa);
            BrokerID cbi = new BrokerID();
            cbi.setID(brokerID);
            ReferenceProperties crp = new ReferenceProperties();
            crp.addProperty(cbi);
            brokerConsumerEPR.setReferenceProperties(crp);
            BrokerConsumerReference brokerConsumerReference = new BrokerConsumerReference();
            brokerConsumerReference.setReference(brokerConsumerEPR);
View Full Code Here

    private void addSubscriberUrl(URL subscriberUrl) {
        addSubscriber(subscriberUrl, null);
    }
   
    private void addSubscriber(EndpointReference subscriberEPR) {
        BrokerID brokerID = null;
        if (subscriberEPR.getReferenceProperties() != null) {
            brokerID = subscriberEPR.getReferenceProperties().getProperty(BrokerID.class);
        }
        addSubscriber(subscriberEPR.getEndpointAddress().getAddress(), (brokerID != null ? brokerID.getID() : null));
    }
View Full Code Here

                    }
                    nbr.setBrokers(brokers);
                }
                EndpointReference consumerEPR = nb.getBrokerConsumerReference().getReference();
                URL consumerUrl = consumerEPR.getEndpointAddress().getAddress();
                BrokerID consumerBrokerID = consumerEPR.getReferenceProperties().getProperty(BrokerID.class);
                EndpointReference producerEPR = nb.getBrokerProducerReference().getReference();
                URL producerUrl = producerEPR.getEndpointAddress().getAddress();
                BrokerID producerBrokerID = producerEPR.getReferenceProperties().getProperty(BrokerID.class);
                if (consumerBrokerID == null ||
                        producerBrokerID == null ||
                            !consumerBrokerID.getID().equals(producerBrokerID.getID())) {
                    throw new RuntimeException("Producer and consumer broker ids do not match");
                }
                // only add broker if consumerList == null && producerList == null
                // otherwise, make it a pending broker and wait for ack
                // TODO block for a configurable amount of time
View Full Code Here

        public WriteableConnectionOverride(URL brokerConsumerUrl, String brokerID) {
            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(brokerConsumerUrl);
            EndpointReference brokerConsumerEPR = new EndpointReference();
            brokerConsumerEPR.setEndpointAddress(epa);
            BrokerID cbi = new BrokerID();
            cbi.setID(brokerID);
            ReferenceProperties crp = new ReferenceProperties();
            crp.addProperty(cbi);
            brokerConsumerEPR.setReferenceProperties(crp);
            BrokerConsumerReference brokerConsumerReference = new BrokerConsumerReference();
            brokerConsumerReference.setReference(brokerConsumerEPR);
View Full Code Here

            EndpointAddress epa = new EndpointAddress();
            epa.setAddress(url);
            EndpointReference epr = new EndpointReference();
            epr.setEndpointAddress(epa);
            if (brokerID != null) {
                BrokerID cbi = new BrokerID();
                cbi.setID(brokerID);
                ReferenceProperties crp = new ReferenceProperties();
                crp.addProperty(cbi);
                epr.setReferenceProperties(crp);
            }
            ConsumerReference cr = new ConsumerReference();
View Full Code Here

    public void addSubscriberUrl(URL subscriberUrl) {
        addSubscriber(subscriberUrl, null);
    }
   
    public void addSubscriber(EndpointReference subscriberEPR) {
        BrokerID brokerID = null;
        if (subscriberEPR.getReferenceProperties() != null) {
            brokerID = subscriberEPR.getReferenceProperties().getProperty(BrokerID.class);
        }
        addSubscriber(subscriberEPR.getEndpointAddress().getAddress(), (brokerID != null ? brokerID.getID() : null));
    }
View Full Code Here

                    }
                    nbr.setBrokers(brokers);
                }
                EndpointReference consumerEPR = nb.getBrokerConsumerReference().getReference();
                URL consumerUrl = consumerEPR.getEndpointAddress().getAddress();
                BrokerID consumerBrokerID = consumerEPR.getReferenceProperties().getProperty(BrokerID.class);
                EndpointReference producerEPR = nb.getBrokerProducerReference().getReference();
                URL producerUrl = producerEPR.getEndpointAddress().getAddress();
                BrokerID producerBrokerID = producerEPR.getReferenceProperties().getProperty(BrokerID.class);
                if (consumerBrokerID == null ||
                        producerBrokerID == null ||
                            !consumerBrokerID.getID().equals(producerBrokerID.getID())) {
                    throw new RuntimeException("Producer and consumer broker ids do not match");
                }
                // only add broker if consumerList == null && producerList == null
                // otherwise, make it a pending broker and wait for ack
                // TODO block for a configurable amount of time
View Full Code Here

TOP

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

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.