Examples of BrokerInfo


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

                remoteConnectionInfo.setClientId("NC_"+localBrokerName+"_outbound"+name);
                remoteConnectionInfo.setUserName(userName);
                remoteConnectionInfo.setPassword(password);
                remoteBroker.oneway(remoteConnectionInfo);

                BrokerInfo brokerInfo=new BrokerInfo();
                brokerInfo.setBrokerName(localBrokerName);
                remoteBroker.oneway(brokerInfo);

                SessionInfo remoteSessionInfo=new SessionInfo(remoteConnectionInfo,1);
                remoteBroker.oneway(remoteSessionInfo);
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

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

Examples of org.apache.activemq.command.BrokerInfo

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

Examples of org.apache.activemq.command.BrokerInfo

        producerInfo = new ProducerInfo(sessionInfo, 1);
        producerInfo.setResponseRequired(false);
        remoteBroker.oneway(producerInfo);

        BrokerInfo brokerInfo = null;
        if (connector != null) {

            brokerInfo = connector.getBrokerInfo();
        }
        else {
            brokerInfo = new BrokerInfo();
        }
        brokerInfo.setBrokerName(broker.getBrokerName());
        brokerInfo.setPeerBrokerInfos(broker.getBroker().getPeerBrokerInfos());
        brokerInfo.setSlaveBroker(true);
        remoteBroker.oneway(brokerInfo);

        log.info("Slave connection between " + localBroker + " and " + remoteBroker + " has been established.");
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        super(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)){
                    log.info("Disconnecting loop back connection.");
                    //waitStarted();
                    ServiceSupport.dispose(this);
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) {
                log.warn("Incoming command does not have a from endpoint: " + command);
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

    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

Examples of org.apache.activemq.command.BrokerInfo

    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

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