Package org.apache.activemq.command

Examples of org.apache.activemq.command.BrokerInfo


     * @deprecated use the {@link #setBrokerService(BrokerService)} method instead.
     */
    @Deprecated
    public void setBrokerName(String name) {
        if (this.brokerInfo==null) {
            this.brokerInfo=new BrokerInfo();
        }
        this.brokerInfo.setBrokerName(name);
    }
View Full Code Here


                        ((Tracked)object).onResponses();
                    }
                }
                if (!initialized) {
                    if (command.isBrokerInfo()) {
                        BrokerInfo info = (BrokerInfo)command;
                        BrokerInfo[] peers = info.getPeerBrokerInfos();
                        if (peers != null) {
                            for (int i = 0; i < peers.length; i++) {
                                String brokerString = peers[i].getBrokerURL();
                                add(brokerString);
                            }
View Full Code Here

        localBroker = control.createMock(Transport.class);
        remoteBroker = control.createMock(Transport.class);

        NetworkBridgeConfiguration configuration = new NetworkBridgeConfiguration();
        brokerService = new BrokerService();
        BrokerInfo remoteBrokerInfo = new BrokerInfo();

        configuration.setDuplex(true);
        configuration.setNetworkTTL(5);
        brokerService.setBrokerId("broker-1");
        brokerService.setPersistent(false);
        brokerService.setUseJmx(false);
        brokerService.start();
        brokerService.waitUntilStarted();
        remoteBrokerInfo.setBrokerId(new BrokerId("remote-broker-id"));
        remoteBrokerInfo.setBrokerName("remote-broker-name");

        localBroker.setTransportListener(EasyMock.isA(TransportListener.class));
        ArgHolder localListenerRef = ArgHolder.holdArgsForLastVoidCall();

        remoteBroker.setTransportListener(EasyMock.isA(TransportListener.class));
View Full Code Here

            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.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

    public void oneway(Object object) throws IOException {
        if (object instanceof Command) {
            Command command = (Command)object;

            if (command instanceof BrokerInfo) {
                BrokerInfo brokerInfo = (BrokerInfo)command;

                brokerId = brokerInfo.getBrokerId().toString();
                from = brokerInfo.getBrokerName();
                try {
                    writeOpenStream(brokerId, from);
                } catch (XMLStreamException e) {
                    throw IOExceptionSupport.create(e);
                }
View Full Code Here

public class BrokerInfoTest extends BaseCommandTestSupport {

    public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();

    public Object createObject() throws Exception {
        BrokerInfo info = new BrokerInfo();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        BrokerInfo info = (BrokerInfo)object;
        info.setBrokerId(createBrokerId("BrokerId:1"));
        info.setBrokerURL("BrokerURL:2");

        {
            BrokerInfo value[] = new BrokerInfo[0];
            for (int i = 0; i < 0; i++) {
                value[i] = createBrokerInfo("PeerBrokerInfos:3");
            }
            info.setPeerBrokerInfos(value);
        }
View Full Code Here

import org.apache.activemq.command.BrokerInfo;

public class BrokerInfoData extends DataFileGenerator {

    protected Object createObject() {
        BrokerInfo rc = new BrokerInfo();
        rc.setResponseRequired(false);
        rc.setBrokerName("localhost");
        rc.setBrokerURL("tcp://localhost:61616");
        rc.setBrokerId(new BrokerId("ID:1289012830123"));
        rc.setCommandId((short) 12);
        rc.setResponseRequired(false);
        return rc;
    }
View Full Code Here

public class BrokerInfoTest extends BaseCommandTestSupport {

    public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();

    public Object createObject() throws Exception {
        BrokerInfo info = new BrokerInfo();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        BrokerInfo info = (BrokerInfo)object;

        info.setBrokerId(createBrokerId("BrokerId:1"));
        info.setBrokerURL("BrokerURL:2");
        {
            BrokerInfo value[] = new BrokerInfo[0];
            for (int i = 0; i < 0; i++) {
                value[i] = createBrokerInfo("PeerBrokerInfos:3");
            }
            info.setPeerBrokerInfos(value);
        }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.BrokerInfo

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.