Search in sources :

Example 1 with JacksonObjectPersisterFactory

use of com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory in project robospice by stephanenicolas.

the class JacksonGoogleHttpClientSpiceService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) throws CacheCreationException {
    CacheManager cacheManager = new CacheManager();
    cacheManager.addPersister(new JacksonObjectPersisterFactory(application));
    return cacheManager;
}
Also used : JacksonObjectPersisterFactory(com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory) CacheManager(com.octo.android.robospice.persistence.CacheManager)

Example 2 with JacksonObjectPersisterFactory

use of com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory in project robospice by stephanenicolas.

the class GoogleHttpClientSpiceTestService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) {
    CacheManager cacheManager = new CacheManager();
    try {
        JacksonObjectPersisterFactory jacksonObjectPersisterFactory = new JacksonObjectPersisterFactory(application, new File("/"));
        cacheManager.addPersister(jacksonObjectPersisterFactory);
    } catch (CacheCreationException e) {
        Ln.e(e);
    }
    return cacheManager;
}
Also used : JacksonObjectPersisterFactory(com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory) CacheCreationException(com.octo.android.robospice.persistence.exception.CacheCreationException) CacheManager(com.octo.android.robospice.persistence.CacheManager) File(java.io.File)

Aggregations

CacheManager (com.octo.android.robospice.persistence.CacheManager)2 JacksonObjectPersisterFactory (com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory)2 CacheCreationException (com.octo.android.robospice.persistence.exception.CacheCreationException)1 File (java.io.File)1