be.unamur.inference.web.apache.UserRequesRRKeyGenerator Maven / Gradle / Ivy
package be.unamur.inference.web.apache;
import be.unamur.inference.ngram.ObjectKeyGenerator;
/**
* Request Resource key generator. Generates a key equal to the type of request
* (HEAD, GET, POST) and the resource name.
*
* @author Xavier Devroey
*
*/
public class UserRequesRRKeyGenerator implements ObjectKeyGenerator {
private static UserRequesRRKeyGenerator instance = null;
private UserRequesRRKeyGenerator() {
}
/**
* Returns the singleton instance of this class.
*/
public static UserRequesRRKeyGenerator getInstance() {
return instance == null ? instance = new UserRequesRRKeyGenerator() : instance;
}
@Override
public String generateKey(ApacheUserRequest request) {
return String.format("%s %s", request.getRequestType(), request.getResource());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy