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);
} else {
from.setBrokerInfo(remoteBrokerInfo);
}
if (localBrokerId != null) {
if (localBrokerId.equals(remoteBrokerId)) {
LOG.info("Disconnecting loop back connection.");
// waitStarted();