Java: allow retries when server is unavailable (if route permits it)