All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.octo.android.robospice.GsonGoogleHttpClientSpiceService Maven / Gradle / Ivy

package com.octo.android.robospice;

import android.app.Application;

import com.octo.android.robospice.persistence.CacheManager;
import com.octo.android.robospice.persistence.exception.CacheCreationException;
import com.octo.android.robospice.persistence.googlehttpclient.json.GsonObjectPersisterFactory;

/**
 * A {@link GoogleHttpClientSpiceService} dedicated to json web services via
 * gson. Provides caching.
 * @author sni
 */
public class GsonGoogleHttpClientSpiceService extends GoogleHttpClientSpiceService {

    @Override
    public CacheManager createCacheManager(Application application) throws CacheCreationException {
        CacheManager cacheManager = new CacheManager();
        cacheManager.addPersister(new GsonObjectPersisterFactory(application));
        return cacheManager;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy