Examples of BrokerInfo


Examples of org.apache.activemq.command.BrokerInfo

        assertNoMessagesLeft(connectionA);

    }

    public void testNoBrokersInBrokerInfo() throws Exception {
        final BrokerInfo info[] = new BrokerInfo[1];
        TransportListener listener = new TransportListener() {
            @Override
            public void onCommand(Object command) {
                LOG.info("Got command: " + command);
                if (command instanceof BrokerInfo) {
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        super(configuration, localBroker, remoteBroker);
    }

    protected void serviceRemoteBrokerInfo(Command command) throws IOException {
        synchronized (brokerInfoMutex) {
            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
            remoteBrokerId = remoteBrokerInfo.getBrokerId();
            remoteBrokerPath[0] = remoteBrokerId;
            remoteBrokerName = remoteBrokerInfo.getBrokerName();
            if (localBrokerId != null) {
                if (localBrokerId.equals(remoteBrokerId)) {
                    if (LOG.isTraceEnabled()) {
                        LOG.trace(configuration.getBrokerName() + " disconnecting remote loop back connection: " + remoteBrokerName);
                    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        remoteBrokerNameKnownLatch.countDown();
    }

    protected void serviceRemoteBrokerInfo(Command command) throws IOException {
        synchronized (brokerInfoMutex) {
            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
            BrokerId remoteBrokerId = remoteBrokerInfo.getBrokerId();

            // lets associate the incoming endpoint with a broker ID so we can
            // refer to it later
            Endpoint from = command.getFrom();
            if (from == null) {
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        return new JMSException("Unknown destination type: " + destination.getDestinationType());
    }

    @Override
    public synchronized void addBroker(Connection connection, BrokerInfo info) {
        BrokerInfo existing = brokerInfos.get(info.getBrokerId());
        if (existing == null) {
            existing = info.copy();
            existing.setPeerBrokerInfos(null);
            brokerInfos.put(info.getBrokerId(), existing);
        }
        existing.incrementRefCount();
        LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
        addBrokerInClusterUpdate();
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

    }

    @Override
    public synchronized void removeBroker(Connection connection, BrokerInfo info) {
        if (info != null) {
            BrokerInfo existing = brokerInfos.get(info.getBrokerId());
            if (existing != null && existing.decrementRefCount() == 0) {
               brokerInfos.remove(info.getBrokerId());
            }
            LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
            removeBrokerInClusterUpdate();
        }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        producerInfo = new ProducerInfo(sessionInfo, 1);
        producerInfo.setResponseRequired(false);
        if (connector != null) {
            brokerInfo = connector.getBrokerInfo();
        } else {
            brokerInfo = new BrokerInfo();
        }
        brokerInfo.setBrokerName(broker.getBrokerName());
        brokerInfo.setPeerBrokerInfos(broker.getBroker().getPeerBrokerInfos());
        brokerInfo.setSlaveBroker(true);
        brokerInfo.setPassiveSlave(broker.isPassiveSlave());
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

                } else {
                    taskRunner = null;
                }
                transport.start();
                active = true;
                BrokerInfo info = connector.getBrokerInfo().copy();
                if (connector.isUpdateClusterClients()) {
                    info.setPeerBrokerInfos(this.broker.getPeerBrokerInfos());
                } else {
                    info.setPeerBrokerInfos(null);
                }
                dispatchAsync(info);
               
                connector.onStarted(this);
            }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

     *             instead.
     */
    @Deprecated
    public void setBrokerName(String name) {
        if (this.brokerInfo == null) {
            this.brokerInfo = new BrokerInfo();
        }
        this.brokerInfo.setBrokerName(name);
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

                } else {
                    taskRunner = null;
                }
                transport.start();
                active = true;
                BrokerInfo info = connector.getBrokerInfo().copy();
                info.setPeerBrokerInfos(this.broker.getPeerBrokerInfos());
                dispatchAsync(info);
               
                connector.onStarted(this);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

            if (LOG.isTraceEnabled()) {
                LOG.trace(configuration.getBrokerName() + " starting remote Bridge, localBroker=" + localBroker);
            }
            synchronized (this) {
                if (!isCreatedByDuplex()) {
                    BrokerInfo brokerInfo = new BrokerInfo();
                    brokerInfo.setBrokerName(configuration.getBrokerName());
                    brokerInfo.setBrokerURL(configuration.getBrokerURL());
                    brokerInfo.setNetworkConnection(true);
                    brokerInfo.setDuplexConnection(configuration.isDuplex());
                    // set our properties
                    Properties props = new Properties();
                    IntrospectionSupport.getProperties(configuration, props, null);
                    String str = MarshallingSupport.propertiesToString(props);
                    brokerInfo.setNetworkProperties(str);
                    brokerInfo.setBrokerId(this.localBrokerId);
                    remoteBroker.oneway(brokerInfo);
                }
                if (remoteConnectionInfo != null) {
                    remoteBroker.oneway(remoteConnectionInfo.createRemoveCommand());
                }
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.