+ private void validateTimers(String heartBeatPeriod, String countDownTimer,
+ String existingHeartBeatPeriod) throws VesAgentException {
+ if (null != countDownTimer
+ && !countDownTimer.equalsIgnoreCase(VesAgentConstants.COUNT_DOWN_TIMER_ZERO)) {
+ validateHeartBeatPeriod(heartBeatPeriod, existingHeartBeatPeriod);
+
+ }
+ }
+
+ private void validateHeartBeatPeriod(String heartBeatPeriod, String existingHeartBeatPeriod)
+ throws VesAgentException {
+ if (null == heartBeatPeriod || heartBeatPeriod.equalsIgnoreCase(existingHeartBeatPeriod)) {
+ String exceptionReason = "Can't change timer value if heartbeat value is same";
+ throw new VesAgentException(VesAgentConstants.INVALID_PARAMETER_VALUE, exceptionReason);
+ }
+ }
+