/** Find the data for a given id */ public SOAPMonitorData findData(Long id) { SOAPMonitorData soap = null; for (int row = data.size(); (row > 0) && (soap == null); row--) { soap = (SOAPMonitorData) data.elementAt(row - 1); if (soap.getId().longValue() != id.longValue()) { soap = null; } } return soap; }
/** Check if soap data matches filter */ public boolean filterMatch(SOAPMonitorData soap) { boolean match = true; if (filter_include != null) { // Check for service match Enumeration e = filter_include.elements(); match = false; while (e.hasMoreElements() && !match) { String service = (String) e.nextElement(); if (service.equals(soap.getTargetService())) { match = true; } } } if (filter_exclude != null) { // Check for service match Enumeration e = filter_exclude.elements(); while (e.hasMoreElements() && match) { String service = (String) e.nextElement(); if (service.equals(soap.getTargetService())) { match = false; } } } if (filter_active) { // Check for active status match if (soap.getSOAPResponse() != null) { match = false; } } if (filter_complete) { // Check for complete status match if (soap.getSOAPResponse() == null) { match = false; } } // The "most recent" is always a match if (soap.getId() == null) { match = true; } return match; }