/** * <p>decode</p> * * @param statusName a {@link java.lang.String} object. * @param reason a {@link java.lang.String} object. * @return a {@link org.opennms.netmgt.poller.PollStatus} object. */ public static PollStatus decode(final String statusName, final String reason) { return decode(statusName, reason, null); }
/** * <p>decode</p> * * @param statusName a {@link java.lang.String} object. * @return a {@link org.opennms.netmgt.poller.PollStatus} object. */ public static PollStatus decode(final String statusName) { return decode(statusName, null, null); }
/** * <p>decode</p> * * @param statusName a {@link java.lang.String} object. * @param responseTime a {@link java.lang.Double} object. * @return a {@link org.opennms.netmgt.poller.PollStatus} object. */ public static PollStatus decode(final String statusName, final Double responseTime) { return decode(statusName, null, responseTime); }
private PassiveStatusValue getPassiveStatusValue(Event e) { return new PassiveStatusValue( EventUtils.getParm(e, EventConstants.PARM_PASSIVE_NODE_LABEL), EventUtils.getParm(e, EventConstants.PARM_PASSIVE_IPADDR), EventUtils.getParm(e, EventConstants.PARM_PASSIVE_SERVICE_NAME), PollStatus.decode(EventUtils.getParm(e, EventConstants.PARM_PASSIVE_SERVICE_STATUS),EventUtils.getParm(e,EventConstants.PARM_PASSIVE_REASON_CODE)) ); }
return PollStatus.decode("Down", "State of SIP Peer is unknown, because it was not found on the Asterisk server"); return PollStatus.decode("Up", "OK"); return PollStatus.decode("Down", "State of SIP Peer is " + response.getAttribute("Status") + " and not OK"); return PollStatus.decode("Down", "Could not get the state of SIP Peer: AMI AuthenticationError"); return PollStatus.decode("Down", "Could not get the state of SIP Peer: " + e.toString()); return PollStatus.decode("Down", "Could not get the state of SIP Peer: Timeout exceeded");
return PollStatus.decode("Down", "State of SIP Peer is unknown, because it was not found on the Asterisk server"); return PollStatus.decode("Up", "OK"); return PollStatus.decode("Down", "State of SIP Peer is " + response.getAttribute("Status") + " and not OK"); return PollStatus.decode("Down", "Could not get the state of SIP Peer: AMI AuthenticationError"); return PollStatus.decode("Down", "Could not get the state of SIP Peer: " + e.toString()); return PollStatus.decode("Down", "Could not get the state of SIP Peer: Timeout exceeded");