public Server getServerByIndex(int index, boolean availableOnly) {
        try {
            return (availableOnly ? upServerList.get(index) : allServerList
                    .get(index));
        } catch (Exception e) {
            return null;
        }
    }
return the server

@param index
@param availableOnly
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/BaseLoadBalancer.java