1 7 package org.jboss.web.loadbalancer.scheduler; 8 9 import java.net.URL ; 10 11 19 public class RoundRobinSchedulerService 20 extends AbstractScheduler implements RoundRobinSchedulerServiceMBean { 21 private int index = 0; 22 public RoundRobinSchedulerService() { 23 } 24 25 protected Host getNextHost() { 26 Host host = null; 27 try 28 { 29 host = (Host) hostsUp.get(index++); 30 } 31 catch (IndexOutOfBoundsException iobex) 32 { 33 index = 0; 34 } 35 return host; 36 } 37 } 38 | Popular Tags |