class JFastCGIPlugin extends PlayPlugin {

    Map<String, Map<String, String>> createConfigMap(Properties configuration) {
        Set<Object> keys = configuration.keySet();

        Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>();

        for (Object key : keys) {
            Matcher matcher = configPattern.matcher(key.toString());
            if (matcher.matches()) {
                String endpointName = matcher.group(1);
                String paramName = matcher.group(2);
                String value = configuration.getProperty((String) key);

                if (!configMap.containsKey(endpointName)) {
                    configMap.put(endpointName, new HashMap<String, String>());
                }

                configMap.get(endpointName).put(paramName, value);
            }
        }
        return configMap;
    }

}