@Test public void testPoll() throws UnknownHostException { MonitoredService svc = MonitorTestUtils.getMonitoredService(99, InetAddress.getByName("10.123.123.123"), "JCIFS"); Map<String, Object> m = Collections.synchronizedMap(new TreeMap<String, Object>()); replay(mockSmbFolderEmpty, mockSmbFolderNotEmpty, mockSmbFileValidPath, mockSmbFileInvalidPath, SmbFile.class); JCifsMonitor jCifsMonitor = new JCifsMonitor(); PollStatus pollStatus; m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("path", "/validPath"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.up(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("path", "/invalidPath"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_NOT_EXIST"); m.put("path", "/validPath"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_NOT_EXIST"); m.put("path", "/invalidPath"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.up(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "FOLDER_EMPTY"); m.put("path", "/folderNotEmpty"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "FOLDER_EMPTY"); m.put("path", "/folderEmpty"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.up(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "FOLDER_NOT_EMPTY"); m.put("path", "/folderNotEmpty"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.up(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "FOLDER_NOT_EMPTY"); m.put("path", "/folderEmpty"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "ABC"); m.put("path", "/folderEmpty"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.unknown(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("path", "/smbException"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("path", "/malformedUrlException"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("smbHost", ""); m.put("path", "/validPath"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.up(), pollStatus); m.put("username", "user"); m.put("password", "pass"); m.put("domain", "dom"); m.put("mode", "PATH_EXIST"); m.put("smbHost", "192.168.0.123"); m.put("path", "/smbException"); pollStatus = jCifsMonitor.poll(svc, m); assertEquals(PollStatus.down(), pollStatus); assertTrue(pollStatus.getReason().matches(".*192\\.168\\.0\\.123.*")); }
public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : ""; final String username = parameters.containsKey("username") ? (String) parameters.get("username") : ""; final String password = parameters.containsKey("password") ? (String) parameters.get("password") : ""; String mode = parameters.containsKey("mode") ? ((String) parameters.get("mode")).toUpperCase() : "PATH_EXIST"; String path = parameters.containsKey("path") ? (String) parameters.get("path") : ""; String smbHost = parameters.containsKey("smbHost") ? (String) parameters.get("smbHost") : ""; final String folderIgnoreFiles = parameters.containsKey("folderIgnoreFiles") ? (String) parameters.get("folderIgnoreFiles") : ""; if ("".equals(smbHost)) { smbHost = svc.getIpAddr(); } SmbFilenameFilter smbFilenameFilter = new SmbFilenameFilter() { @Override public boolean accept(SmbFile smbFile, String s) throws SmbException { return !s.matches(folderIgnoreFiles); } }; Mode enumMode = Mode.PATH_EXIST; try { enumMode = Mode.valueOf(mode); } catch (IllegalArgumentException exception) { logger.error("Mode '{}‘ does not exists. Valid candidates are {}", mode, modeCandidates); return PollStatus.unknown("Mode " + mode + " does not exists. Valid candidates are " + modeCandidates); } if (!path.startsWith("/")) { path = "/" + path; logger.debug("Added leading / to path."); } String authString = ""; if (domain != null && !"".equals(domain)) { authString += domain + ";"; } authString += username + ":" + password; String fullUrl = "smb: logger.debug("Domain: [{}], Username: [{}], Password: [{}], Mode: [{}], Path: [{}], Authentication: [{}], Full Url: [{}]", new Object[]{domain, username, password, mode, path, authString, fullUrl}); TimeoutTracker tracker = new TimeoutTracker(parameters, DEFAULT_RETRY, DEFAULT_TIMEOUT); PollStatus serviceStatus = PollStatus.unknown(); for (tracker.reset(); tracker.shouldRetry() && !serviceStatus.isAvailable(); tracker.nextAttempt()) { NtlmPasswordAuthentication ntlmPasswordAuthentication = new NtlmPasswordAuthentication(authString); try { SmbFile smbFile = new SmbFile(fullUrl, ntlmPasswordAuthentication); smbFile.setConnectTimeout(tracker.getConnectionTimeout()); boolean smbFileExists = smbFile.exists(); switch (enumMode) { case PATH_EXIST: if (smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should exists but doesn't!"); } break; case PATH_NOT_EXIST: if (!smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should not exists but does!"); } break; case FOLDER_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length == 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should be empty but isn't!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; case FOLDER_NOT_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length > 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should not be empty but is!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; default: logger.warn("There is no implementation for the specified mode '{}'", mode); break; } } catch (MalformedURLException exception) { logger.error("Malformed URL on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } catch (SmbException exception) { logger.error("SMB error on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } } return serviceStatus; }
JCifsMonitor extends AbstractServiceMonitor { public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : ""; final String username = parameters.containsKey("username") ? (String) parameters.get("username") : ""; final String password = parameters.containsKey("password") ? (String) parameters.get("password") : ""; String mode = parameters.containsKey("mode") ? ((String) parameters.get("mode")).toUpperCase() : "PATH_EXIST"; String path = parameters.containsKey("path") ? (String) parameters.get("path") : ""; String smbHost = parameters.containsKey("smbHost") ? (String) parameters.get("smbHost") : ""; final String folderIgnoreFiles = parameters.containsKey("folderIgnoreFiles") ? (String) parameters.get("folderIgnoreFiles") : ""; if ("".equals(smbHost)) { smbHost = svc.getIpAddr(); } SmbFilenameFilter smbFilenameFilter = new SmbFilenameFilter() { @Override public boolean accept(SmbFile smbFile, String s) throws SmbException { return !s.matches(folderIgnoreFiles); } }; Mode enumMode = Mode.PATH_EXIST; try { enumMode = Mode.valueOf(mode); } catch (IllegalArgumentException exception) { logger.error("Mode '{}‘ does not exists. Valid candidates are {}", mode, modeCandidates); return PollStatus.unknown("Mode " + mode + " does not exists. Valid candidates are " + modeCandidates); } if (!path.startsWith("/")) { path = "/" + path; logger.debug("Added leading / to path."); } String authString = ""; if (domain != null && !"".equals(domain)) { authString += domain + ";"; } authString += username + ":" + password; String fullUrl = "smb: logger.debug("Domain: [{}], Username: [{}], Password: [{}], Mode: [{}], Path: [{}], Authentication: [{}], Full Url: [{}]", new Object[]{domain, username, password, mode, path, authString, fullUrl}); TimeoutTracker tracker = new TimeoutTracker(parameters, DEFAULT_RETRY, DEFAULT_TIMEOUT); PollStatus serviceStatus = PollStatus.unknown(); for (tracker.reset(); tracker.shouldRetry() && !serviceStatus.isAvailable(); tracker.nextAttempt()) { NtlmPasswordAuthentication ntlmPasswordAuthentication = new NtlmPasswordAuthentication(authString); try { SmbFile smbFile = new SmbFile(fullUrl, ntlmPasswordAuthentication); smbFile.setConnectTimeout(tracker.getConnectionTimeout()); boolean smbFileExists = smbFile.exists(); switch (enumMode) { case PATH_EXIST: if (smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should exists but doesn't!"); } break; case PATH_NOT_EXIST: if (!smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should not exists but does!"); } break; case FOLDER_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length == 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should be empty but isn't!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; case FOLDER_NOT_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length > 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should not be empty but is!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; default: logger.warn("There is no implementation for the specified mode '{}'", mode); break; } } catch (MalformedURLException exception) { logger.error("Malformed URL on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } catch (SmbException exception) { logger.error("SMB error on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } } return serviceStatus; } }
JCifsMonitor extends AbstractServiceMonitor { public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : ""; final String username = parameters.containsKey("username") ? (String) parameters.get("username") : ""; final String password = parameters.containsKey("password") ? (String) parameters.get("password") : ""; String mode = parameters.containsKey("mode") ? ((String) parameters.get("mode")).toUpperCase() : "PATH_EXIST"; String path = parameters.containsKey("path") ? (String) parameters.get("path") : ""; String smbHost = parameters.containsKey("smbHost") ? (String) parameters.get("smbHost") : ""; final String folderIgnoreFiles = parameters.containsKey("folderIgnoreFiles") ? (String) parameters.get("folderIgnoreFiles") : ""; if ("".equals(smbHost)) { smbHost = svc.getIpAddr(); } SmbFilenameFilter smbFilenameFilter = new SmbFilenameFilter() { @Override public boolean accept(SmbFile smbFile, String s) throws SmbException { return !s.matches(folderIgnoreFiles); } }; Mode enumMode = Mode.PATH_EXIST; try { enumMode = Mode.valueOf(mode); } catch (IllegalArgumentException exception) { logger.error("Mode '{}‘ does not exists. Valid candidates are {}", mode, modeCandidates); return PollStatus.unknown("Mode " + mode + " does not exists. Valid candidates are " + modeCandidates); } if (!path.startsWith("/")) { path = "/" + path; logger.debug("Added leading / to path."); } String authString = ""; if (domain != null && !"".equals(domain)) { authString += domain + ";"; } authString += username + ":" + password; String fullUrl = "smb: logger.debug("Domain: [{}], Username: [{}], Password: [{}], Mode: [{}], Path: [{}], Authentication: [{}], Full Url: [{}]", new Object[]{domain, username, password, mode, path, authString, fullUrl}); TimeoutTracker tracker = new TimeoutTracker(parameters, DEFAULT_RETRY, DEFAULT_TIMEOUT); PollStatus serviceStatus = PollStatus.unknown(); for (tracker.reset(); tracker.shouldRetry() && !serviceStatus.isAvailable(); tracker.nextAttempt()) { NtlmPasswordAuthentication ntlmPasswordAuthentication = new NtlmPasswordAuthentication(authString); try { SmbFile smbFile = new SmbFile(fullUrl, ntlmPasswordAuthentication); smbFile.setConnectTimeout(tracker.getConnectionTimeout()); boolean smbFileExists = smbFile.exists(); switch (enumMode) { case PATH_EXIST: if (smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should exists but doesn't!"); } break; case PATH_NOT_EXIST: if (!smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should not exists but does!"); } break; case FOLDER_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length == 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should be empty but isn't!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; case FOLDER_NOT_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length > 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should not be empty but is!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; default: logger.warn("There is no implementation for the specified mode '{}'", mode); break; } } catch (MalformedURLException exception) { logger.error("Malformed URL on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } catch (SmbException exception) { logger.error("SMB error on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } } return serviceStatus; }  }
JCifsMonitor extends AbstractServiceMonitor { public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : ""; final String username = parameters.containsKey("username") ? (String) parameters.get("username") : ""; final String password = parameters.containsKey("password") ? (String) parameters.get("password") : ""; String mode = parameters.containsKey("mode") ? ((String) parameters.get("mode")).toUpperCase() : "PATH_EXIST"; String path = parameters.containsKey("path") ? (String) parameters.get("path") : ""; String smbHost = parameters.containsKey("smbHost") ? (String) parameters.get("smbHost") : ""; final String folderIgnoreFiles = parameters.containsKey("folderIgnoreFiles") ? (String) parameters.get("folderIgnoreFiles") : ""; if ("".equals(smbHost)) { smbHost = svc.getIpAddr(); } SmbFilenameFilter smbFilenameFilter = new SmbFilenameFilter() { @Override public boolean accept(SmbFile smbFile, String s) throws SmbException { return !s.matches(folderIgnoreFiles); } }; Mode enumMode = Mode.PATH_EXIST; try { enumMode = Mode.valueOf(mode); } catch (IllegalArgumentException exception) { logger.error("Mode '{}‘ does not exists. Valid candidates are {}", mode, modeCandidates); return PollStatus.unknown("Mode " + mode + " does not exists. Valid candidates are " + modeCandidates); } if (!path.startsWith("/")) { path = "/" + path; logger.debug("Added leading / to path."); } String authString = ""; if (domain != null && !"".equals(domain)) { authString += domain + ";"; } authString += username + ":" + password; String fullUrl = "smb: logger.debug("Domain: [{}], Username: [{}], Password: [{}], Mode: [{}], Path: [{}], Authentication: [{}], Full Url: [{}]", new Object[]{domain, username, password, mode, path, authString, fullUrl}); TimeoutTracker tracker = new TimeoutTracker(parameters, DEFAULT_RETRY, DEFAULT_TIMEOUT); PollStatus serviceStatus = PollStatus.unknown(); for (tracker.reset(); tracker.shouldRetry() && !serviceStatus.isAvailable(); tracker.nextAttempt()) { NtlmPasswordAuthentication ntlmPasswordAuthentication = new NtlmPasswordAuthentication(authString); try { SmbFile smbFile = new SmbFile(fullUrl, ntlmPasswordAuthentication); smbFile.setConnectTimeout(tracker.getConnectionTimeout()); boolean smbFileExists = smbFile.exists(); switch (enumMode) { case PATH_EXIST: if (smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should exists but doesn't!"); } break; case PATH_NOT_EXIST: if (!smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should not exists but does!"); } break; case FOLDER_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length == 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should be empty but isn't!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; case FOLDER_NOT_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length > 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should not be empty but is!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; default: logger.warn("There is no implementation for the specified mode '{}'", mode); break; } } catch (MalformedURLException exception) { logger.error("Malformed URL on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } catch (SmbException exception) { logger.error("SMB error on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } } return serviceStatus; }  PollStatus poll(MonitoredService svc, Map<String, Object> parameters); }
JCifsMonitor extends AbstractServiceMonitor { public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : ""; final String username = parameters.containsKey("username") ? (String) parameters.get("username") : ""; final String password = parameters.containsKey("password") ? (String) parameters.get("password") : ""; String mode = parameters.containsKey("mode") ? ((String) parameters.get("mode")).toUpperCase() : "PATH_EXIST"; String path = parameters.containsKey("path") ? (String) parameters.get("path") : ""; String smbHost = parameters.containsKey("smbHost") ? (String) parameters.get("smbHost") : ""; final String folderIgnoreFiles = parameters.containsKey("folderIgnoreFiles") ? (String) parameters.get("folderIgnoreFiles") : ""; if ("".equals(smbHost)) { smbHost = svc.getIpAddr(); } SmbFilenameFilter smbFilenameFilter = new SmbFilenameFilter() { @Override public boolean accept(SmbFile smbFile, String s) throws SmbException { return !s.matches(folderIgnoreFiles); } }; Mode enumMode = Mode.PATH_EXIST; try { enumMode = Mode.valueOf(mode); } catch (IllegalArgumentException exception) { logger.error("Mode '{}‘ does not exists. Valid candidates are {}", mode, modeCandidates); return PollStatus.unknown("Mode " + mode + " does not exists. Valid candidates are " + modeCandidates); } if (!path.startsWith("/")) { path = "/" + path; logger.debug("Added leading / to path."); } String authString = ""; if (domain != null && !"".equals(domain)) { authString += domain + ";"; } authString += username + ":" + password; String fullUrl = "smb: logger.debug("Domain: [{}], Username: [{}], Password: [{}], Mode: [{}], Path: [{}], Authentication: [{}], Full Url: [{}]", new Object[]{domain, username, password, mode, path, authString, fullUrl}); TimeoutTracker tracker = new TimeoutTracker(parameters, DEFAULT_RETRY, DEFAULT_TIMEOUT); PollStatus serviceStatus = PollStatus.unknown(); for (tracker.reset(); tracker.shouldRetry() && !serviceStatus.isAvailable(); tracker.nextAttempt()) { NtlmPasswordAuthentication ntlmPasswordAuthentication = new NtlmPasswordAuthentication(authString); try { SmbFile smbFile = new SmbFile(fullUrl, ntlmPasswordAuthentication); smbFile.setConnectTimeout(tracker.getConnectionTimeout()); boolean smbFileExists = smbFile.exists(); switch (enumMode) { case PATH_EXIST: if (smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should exists but doesn't!"); } break; case PATH_NOT_EXIST: if (!smbFileExists) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("File " + fullUrl + " should not exists but does!"); } break; case FOLDER_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length == 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should be empty but isn't!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; case FOLDER_NOT_EMPTY: if (smbFileExists) { if (smbFile.list(smbFilenameFilter).length > 0) { serviceStatus = PollStatus.up(); } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should not be empty but is!"); } } else { serviceStatus = PollStatus.down("Directory " + fullUrl + " should exists but doesn't!"); } break; default: logger.warn("There is no implementation for the specified mode '{}'", mode); break; } } catch (MalformedURLException exception) { logger.error("Malformed URL on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } catch (SmbException exception) { logger.error("SMB error on '{}' with error: '{}'", smbHost, exception.getMessage()); serviceStatus = PollStatus.down(exception.getMessage()); } } return serviceStatus; }  PollStatus poll(MonitoredService svc, Map<String, Object> parameters);  }