private JsonObject getResponse() throws IOException { JsonObject requestJSON = new JsonObject(); ProxySet proxies = this.getRegistry().getAllProxies(); Iterator<RemoteProxy> iterator = proxies.iterator(); JsonArray busyProxies = new JsonArray(); JsonArray freeProxies = new JsonArray(); while (iterator.hasNext()) { RemoteProxy eachProxy = iterator.next(); if (eachProxy.isBusy()) { busyProxies.add(eachProxy.getOriginalRegistrationRequest().getAssociatedJSON()); } else { freeProxies.add(eachProxy.getOriginalRegistrationRequest().getAssociatedJSON()); } } requestJSON.add("BusyProxies", busyProxies); requestJSON.add("FreeProxies", freeProxies); return requestJSON; }
private JsonObject getResponse() throws IOException { JsonObject requestJSON = new JsonObject(); ProxySet proxies = this.getRegistry().getAllProxies(); Iterator<RemoteProxy> iterator = proxies.iterator(); JsonArray busyProxies = new JsonArray(); JsonArray freeProxies = new JsonArray(); while (iterator.hasNext()) { RemoteProxy eachProxy = iterator.next(); if (eachProxy.isBusy()) { busyProxies.add(eachProxy.getOriginalRegistrationRequest().getAssociatedJSON()); } else { freeProxies.add(eachProxy.getOriginalRegistrationRequest().getAssociatedJSON()); } } requestJSON.add("BusyProxies", busyProxies); requestJSON.add("FreeProxies", freeProxies); return requestJSON; }
private void initSeLionRemoteProxySpecificValues(RemoteProxy proxy) { if (SeLionRemoteProxy.class.getCanonicalName().equals( proxy.getOriginalRegistrationRequest().getRemoteProxyClass())) { SeLionRemoteProxy srp = (SeLionRemoteProxy) proxy; // figure out if the proxy is scheduled to shutdown isShuttingDown = srp.isScheduledForRecycle(); // update the logsLocation if the proxy supports LogServlet if (srp.supportsViewLogs()) { logsLocation = proxy.getRemoteHost().toExternalForm() + "/extra/" + LogServlet.class.getSimpleName(); } totalSessionsStarted = srp.getTotalSessionsStarted(); totalSessionsComplete = srp.getTotalSessionsComplete(); uptimeInMinutes = srp.getUptimeInMinutes(); } }
private void initSeLionRemoteProxySpecificValues(RemoteProxy proxy) { if (SeLionRemoteProxy.class.getCanonicalName().equals( proxy.getOriginalRegistrationRequest().getConfiguration().proxy)) { SeLionRemoteProxy srp = (SeLionRemoteProxy) proxy; // figure out if the proxy is scheduled to shutdown isShuttingDown = srp.isScheduledForRecycle(); // update the logsLocation if the proxy supports LogServlet if (srp.supportsViewLogs()) { logsLocation = proxy.getRemoteHost().toExternalForm() + "/extra/" + LogServlet.class.getSimpleName(); } totalSessionsStarted = srp.getTotalSessionsStarted(); totalSessionsComplete = srp.getTotalSessionsComplete(); uptimeInMinutes = srp.getUptimeInMinutes(); } }