/** * Tells whether the given HTTP method is supported. * * @param method * @return */ private boolean isMethodSupported(final String method) { for (String aMethod : serverConfig.getSupportedMethods()) { if (aMethod.equals(method)) { return true; } } return false; }
/** * Returns coma separated allowed methods. * * @return */ private String getAllowedMethods() { StringBuilder stringBuilder = new StringBuilder(); List<String> supportedMethods = serverConfig.getSupportedMethods(); for (int i = 0; i < supportedMethods.size(); i++) { stringBuilder.append(supportedMethods.get(i)); if (i != supportedMethods.size() - 1) { stringBuilder.append(", "); } } return stringBuilder.toString(); }