Package org.apache.ace.agent

Examples of org.apache.ace.agent.RetryAfterException


    protected URL getServerURL() throws RetryAfterException {
        // FIXME not sure if this is the proper place
        URL serverURL = getDiscoveryHandler().getServerUrl();
        if (serverURL == null) {
            throw new RetryAfterException(10);
        }
        return serverURL;
    }
View Full Code Here


        }
        else if (rc == SC_SERVICE_UNAVAILABLE) {
            // Service is unavailable, throw an exception to try it again later...
            int retry = ((HttpURLConnection) conn).getHeaderFieldInt(HTTP_RETRY_AFTER, DEFAULT_RETRY_TIME);

            throw new RetryAfterException(retry);
        }

        throw new IOException("Unknown/unexpected status code: " + rc);
    }
View Full Code Here

            case 200:
            case 206:
                return;
            case 503:
                int retry = ((HttpURLConnection) connection).getHeaderFieldInt(HTTP_RETRY_AFTER, DEFAULT_RETRY_TIME);
                throw new RetryAfterException(retry);
            default:
                throw new IOException("Unable to handle server responsecode: " + responseCode + ", for " + connection.getURL());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ace.agent.RetryAfterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.