public int getMaxRenderTime(final int localMaxRenderTime, final WMS wms) { final int wmsMaxRenderTime = wms.getMaxRenderingTime(); if (wmsMaxRenderTime == 0) { maxRenderTime = localMaxRenderTime; } else if (localMaxRenderTime != 0) { maxRenderTime = Math.min(wmsMaxRenderTime, localMaxRenderTime); } else { maxRenderTime = wmsMaxRenderTime; } return maxRenderTime; }
/** * Timeout on the smallest nonzero value of the WMS timeout and the timeout format option If * both are zero then there is no timeout * * @param localMaxRenderingTime */ private int getMaxRenderingTime(int localMaxRenderingTime) { int maxRenderingTime = getMaxRenderingTime() * 1000; if (maxRenderingTime == 0) { maxRenderingTime = localMaxRenderingTime; } else if (localMaxRenderingTime != 0) { maxRenderingTime = Math.min(maxRenderingTime, localMaxRenderingTime); } return maxRenderingTime; }
/** * Returns the max rendering time taking into account the server limits and the request options * * @param request * @return */ public int getMaxRenderingTime(GetMapRequest request) { int localMaxRenderingTime = 0; Object timeoutOption = request.getFormatOptions().get("timeout"); if (timeoutOption != null) { try { localMaxRenderingTime = Integer.parseInt(timeoutOption.toString()); } catch (NumberFormatException e) { RenderedImageMapOutputFormat.LOGGER.log( Level.WARNING, "Could not parse format_option \"timeout\": " + timeoutOption, e); } } int maxRenderingTime = getMaxRenderingTime(localMaxRenderingTime); return maxRenderingTime; }
int maxRenderingTime = getMaxRenderingTime(); long maxTime = maxRenderingTime > 0 ? System.currentTimeMillis() + maxRenderingTime * 1000 : -1;
int maxRenderingTime = wms.getMaxRenderingTime(request); ServiceException serviceException = null; boolean saveMap =