create static method

Creates a proxy rotation strategy based on the given type

Implementation

static ProxyRotationStrategy create(RotationStrategyType type) {
  switch (type) {
    case RotationStrategyType.roundRobin:
      return RoundRobinStrategy();
    case RotationStrategyType.random:
      return RandomStrategy();
    case RotationStrategyType.weighted:
      return WeightedStrategy();
    case RotationStrategyType.leastRecentlyUsed:
      return LeastRecentlyUsedStrategy();
    case RotationStrategyType.adaptive:
      return AdaptiveRotationStrategy();
  }
}