Commit 7e49c039 authored by Andre Freyssinet's avatar Andre Freyssinet

Bug fix: the return value is now false if the message is not received.

Adds a toString method.
parent aa537cb3
......@@ -299,10 +299,12 @@ public final class JMSConnectorCheck {
setStatus(getStatus()+1);
setLatencyPubSub(-1L);
errorMsg = "Message not received";
return false;
} else {
retryStatusCount = 0;
setLatencyPubSub(dt / 1000000L);
errorMsg = null;
return true;
}
} catch (JMSException exc) {
failures += 1;
......@@ -324,6 +326,25 @@ public final class JMSConnectorCheck {
logger.log(BasicLevel.WARN, "JMSConnectorStatus.check(" + cfname + "): Error closing connection.");
}
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("JMSConnectorCheck [")
.append("cfname=").append(cfname)
.append(", user=").append(user)
.append(", pass=****")
.append(", qname=").append(qname)
.append(", timeout=").append(timeout)
.append("] -> [")
.append("retryStatusCount=").append(retryStatusCount)
.append(", nbtry=").append(nbtry)
.append(", errorMsg=").append(errorMsg)
.append(", lastConnectTime=").append(lastConnectTime)
.append(", latencyConnect=").append(latencyConnect)
.append(", latencyPubSub=").append(latencyPubSub)
.append("]");
return builder.toString();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment