Android Open Source - muwifi-autologin Post Retry Handler






From Project

Back to project page muwifi-autologin.

License

The source code is released under:

Copyright 2011-2014 Pawit Pornkitprasan. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are...

If you think the Android project muwifi-autologin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.dyndns.pawitp.muwifiautologin;
/* ww w  .j av  a2s .c  om*/
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.protocol.HttpContext;

import java.io.IOException;

// Retry handler allowing the retry of POST requests
public class PostRetryHandler implements HttpRequestRetryHandler {

    static final int RETRY_COUNT = 2;

    @Override
    public boolean retryRequest(IOException exception, int executionCount,
            HttpContext context) {
        if (executionCount >= RETRY_COUNT) {
            // Do not retry if over max retry count
            return false;
        }

        return true;
    }

}




Java Source Code List

org.dyndns.pawitp.muwifiautologin.ArubaClient.java
org.dyndns.pawitp.muwifiautologin.CiscoClient.java
org.dyndns.pawitp.muwifiautologin.IcClient.java
org.dyndns.pawitp.muwifiautologin.LoginClient.java
org.dyndns.pawitp.muwifiautologin.LoginException.java
org.dyndns.pawitp.muwifiautologin.MuWifiLogin.java
org.dyndns.pawitp.muwifiautologin.MySSLSocketFactory.java
org.dyndns.pawitp.muwifiautologin.NetworkStateChanged.java
org.dyndns.pawitp.muwifiautologin.PostRetryHandler.java
org.dyndns.pawitp.muwifiautologin.Preferences.java
org.dyndns.pawitp.muwifiautologin.ShortcutActivity.java
org.dyndns.pawitp.muwifiautologin.Utils.java