/** * <p>toString</p> * * @return a {@link java.lang.String} object. */ @Override public String toString() { return getStatusName(); }
private PollerResultImpl(PollStatus pollStatus) { this.status = Enums.getIfPresent(Status.class, pollStatus.getStatusName()).or(Status.Unknown); if(status.equals(Status.Up)) { properties = pollStatus.getProperties(); } else { this.reason = pollStatus.getReason(); } }
PollStatus pollStatus = future.get(1, TimeUnit.SECONDS).getPollStatus(); if (pollStatus.getStatusCode() == PollStatus.SERVICE_AVAILABLE) { System.out.printf("\nService is %s on %s using %s:\n", pollStatus.getStatusName(), host, className); final Map<String, Number> properties = pollStatus.getProperties(); if (properties.size() > 0) { System.out.printf("\nService is %s on %s using %s\n", pollStatus.getStatusName(), host, className); System.out.printf("\tReason: %s\n", pollStatus.getReason());
System.out.printf("Available ? %s (status %s[%s])%n", status.isAvailable(), status.getStatusName(), status.getStatusCode()); if (status.isAvailable()) { System.out.printf("Response time: %s%n", status.getResponseTime());
LOG.info( new ToStringBuilder(this) .append("statusName", result.getStatusName()) .append("reason", result.getReason()) .toString()
LOG.info( new ToStringBuilder(this) .append("statusName", result.getStatusName()) .append("reason", result.getReason()) .toString()
/** * <p>compareTo</p> * * @param that a {@link org.opennms.netmgt.poller.remote.ServicePollState} object. * @return a int. */ @Override public int compareTo(final ServicePollState that) { if (that == null) return -1; final PolledService thisService = this.getPolledService(); final PolledService thatService = that.getPolledService(); return new CompareToBuilder() .append(thisService.getNodeLabel(), thatService.getNodeLabel()) .append(thisService.getIpAddr(), thatService.getIpAddr()) // TODO: getLastPoll() can return null so this seems dangerous... .append(this.getLastPoll().getStatusName(), that.getLastPoll().getStatusName()) .append(thisService.getServiceId(), thatService.getServiceId()) .append(thisService.getNodeId(), thatService.getNodeId()) .toComparison(); }
for (SnmpMinimalPollInterface miface : mifaces) { LOG.debug("Working on interface with ifindex: {}", miface.getIfindex()); LOG.debug("Interface PollStatus is {}", miface.getStatus().getStatusName()); if (miface.getStatus().isUp()) { OnmsSnmpInterface iface = m_snmpinterfaces.get(Integer.valueOf(miface.getIfindex()));
/** * <p>compareTo</p> * * @param that a {@link org.opennms.netmgt.poller.remote.ServicePollState} object. * @return a int. */ @Override public int compareTo(final ServicePollState that) { if (that == null) return -1; final PolledService thisService = this.getPolledService(); final PolledService thatService = that.getPolledService(); return new CompareToBuilder() .append(thisService.getNodeLabel(), thatService.getNodeLabel()) .append(thisService.getIpAddr(), thatService.getIpAddr()) // TODO: getLastPoll() can return null so this seems dangerous... .append(this.getLastPoll().getStatusName(), that.getLastPoll().getStatusName()) .append(thisService.getServiceId(), thatService.getServiceId()) .append(thisService.getNodeId(), thatService.getNodeId()) .toComparison(); }
"element/service.jsp?ifserviceid=" + s.getMonitoredService().getId()); table.addCell(s.getPollResult().getStatusName(), "bright"); table.addCell(getResponseText(s.getPollResult()), "");
"element/service.jsp?ifserviceid=" + s.getMonitoredService().getId()); table.addCell(s.getPollResult().getStatusName(), "bright"); table.addCell(getResponseText(s.getPollResult()), "");