Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.theagilemonkeys.meets.request;
 
Created by kloster on 4/06/14.
 
 public class DefaultRequestWrapper<RESULT> implements RequestWrapper<RESULT> {
    private ApiMethod<RESULT> method;
    public DefaultRequestWrapper(ApiMethod<RESULT> method) {
        this. = method;
    }
    @Override
    public void makeRequest(Deferred deferred) {
        makeRequest(deferrednull);
    }
    @Override
    @SuppressWarnings("unchecked")
    public void makeRequest(Deferred deferredString cacheKey){
        try {
            RESULT res = .loadDataFromNetwork();
            deferred.resolve(res);
        }
        catch (Exception e) {
            deferred.reject(e);
            throw new RuntimeException(e);
        }
    }
New to GrepCode? Check out our FAQ X