Examples of BrokerId


Examples of org.apache.activemq.command.BrokerId

    }

    @Override
    public BrokerId getBrokerId() {
        if (brokerId == null) {
            brokerId = new BrokerId(BROKER_ID_GENERATOR.generateId());
        }
        return brokerId;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

            try {
                // We first look if existing network connection already exists for the same broker Id
                // It's possible in case of brief network fault to have this transport connector side of the connection always active
                // and the duplex network connector side wanting to open a new one
                // In this case, the old connection must be broken
                BrokerId  remoteBrokerId = info.getBrokerId();
                setDuplexRemoteBrokerId(remoteBrokerId);
                CopyOnWriteArrayList<TransportConnection> connections = this.connector.getConnections();
                for (Iterator<TransportConnection> iter = connections.iterator(); iter.hasNext();) {
                TransportConnection c = iter.next();
                    if ((c != this) && (remoteBrokerId.equals(c.getDuplexRemoteBrokerId()))) {
                        LOG.warn("An existing duplex active connection already exists for this broker (" + remoteBrokerId + "). Stopping it.");
                        c.stop();
                    }
                }
                Properties properties = MarshallingSupport.stringToProperties(info.getNetworkProperties());
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId[] pathsToAppend) {
        if (brokerPath == null || brokerPath.length == 0) {
            return pathsToAppend;
        }
        BrokerId rc[] = new BrokerId[brokerPath.length + pathsToAppend.length];
        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
        System.arraycopy(pathsToAppend, 0, rc, brokerPath.length, pathsToAppend.length);
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId idToAppend) {
        if (brokerPath == null || brokerPath.length == 0) {
            return new BrokerId[] { idToAppend };
        }
        BrokerId rc[] = new BrokerId[brokerPath.length + 1];
        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
        rc[brokerPath.length] = idToAppend;
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

    public BrokerId getBrokerId() {
        if( brokerId==null ) {
            // TODO: this should persist the broker id so that subsequent startup
            // uses the same broker id.
            brokerId=new BrokerId(brokerIdGenerator.generateId());
        }
        return brokerId;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

    }

    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId[] pathsToAppend) {
        if (brokerPath == null || brokerPath.length == 0)
            return pathsToAppend;
        BrokerId rc[] = new BrokerId[brokerPath.length + pathsToAppend.length];
        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
        System.arraycopy(pathsToAppend, 0, rc, brokerPath.length, pathsToAppend.length);
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

    }

    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId idToAppend) {
        if (brokerPath == null || brokerPath.length == 0)
            return new BrokerId[] { idToAppend };
        BrokerId rc[] = new BrokerId[brokerPath.length + 1];
        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
        rc[brokerPath.length] = idToAppend;
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

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

        wf.setVersion(2);
        return wf;
    }

    protected BrokerId createBrokerId(String text) {
        return new BrokerId(text);
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerId

        // exception each time
        return singletonException;
    }
   
    protected BooleanExpression createBooleanExpression(String string) {
        return new NetworkBridgeFilter(new BrokerId(string), 10);
    }
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.