* @return ThrottleContext - The corresponding ThrottleContext for the given throttle type
* @throws ThrottleException - Throws for if the throttle type is unknown
*/
public static ThrottleContext createThrottleContext(int throttletype, ThrottleConfiguration configuration) throws ThrottleException {
if (ThrottleConstants.IP_BASE == throttletype) {
return new IPBaseThrottleContext(configuration);
} else if (ThrottleConstants.DOMAIN_BASE == throttletype) {
return new DomainBaseThrottleContext(configuration);
} else {
throw new ThrottleException("Unknown throttle type");
}