Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.phonedeck.gcm4j;


Exception that is thrown when the GCM server responds with an error.
 
 public class GcmNetworkException extends GcmException {
 
     private static final long serialVersionUID = -8755599343380178261L;
    private final int code;
    private final String response;
    private final Long retryAfter;
    
    public GcmNetworkException(String messageThrowable cause) {
        super(messagecause);
        this. = 0;
        this. = null;
        this. = null;
    }
    public GcmNetworkException(int codeString responseThrowable cause) {
        this(coderesponsenullcause);
    }
    public GcmNetworkException(int codeString responseLong retryAfterThrowable cause) {
        super("HTTP " + code + ": " + responsecause);
        this. = code;
        this. = response;
        this. = retryAfter;
    }
    public int getCode() {
        return ;
    }
    public String getResponse() {
        return ;
    }
    public Long getRetryAfter() {
        return ;
    }
    
    
Returns whether it would be possible to re-try sending this request at a later date or not.

Returns:
true if a retry would be viable, otherwise false.
    public boolean canRetry() {
        switch ()
        {
        case 200:
            return true;
        case 400:
        case 401:
            return false;
        default:
            return true;
        }
    }
New to GrepCode? Check out our FAQ X