Android JacksonObjectPersisterFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android JacksonObjectPersisterFactory class.

This code example shows how to use the following methods:
 */ 
public class JacksonSpringAndroidSpiceService extends SpringAndroidSpiceService { 
    @Override 
    public CacheManager createCacheManager(Application application) throws CacheCreationException { 
        CacheManager cacheManager = new CacheManager(); 
        cacheManager.addPersister(new JacksonObjectPersisterFactory(application)); 
        return cacheManager; 
    } 
 
    @Override 
    public RestTemplate createRestTemplate() { 
        RestTemplate restTemplate = new RestTemplate(); 
 
        // web services support json responses 
        MappingJacksonHttpMessageConverter jsonConverter = new MappingJacksonHttpMessageConverter(); 
        final List<HttpMessageConverter<?>> listHttpMessageConverters = restTemplate.getMessageConverters(); 
 
        listHttpMessageConverters.add(jsonConverter); 
        restTemplate.setMessageConverters(listHttpMessageConverters); 
        return restTemplate; 
5
CodeRank
This code example shows how to use the following methods:
public class SpringAndroidTestService extends SpringAndroidSpiceService { 
 
    @Override 
    public CacheManager createCacheManager(Application application) throws CacheCreationException { 
        CacheManager cacheManager = new CacheManager(); 
        cacheManager.addPersister(new JacksonObjectPersisterFactory(application, new File("/"))); 
        return cacheManager; 
    } 
 
    @Override 
    public RestTemplate createRestTemplate() { 
        return new RestTemplate(); 
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:setAsyncSaveEnabled
	public CacheManager createCacheManager(Application application) { 
		CacheManager cacheManager = new CacheManager(); 
 
		JacksonObjectPersisterFactory inJSonFileObjectPersisterFactory; 
		try { 
			inJSonFileObjectPersisterFactory = new JacksonObjectPersisterFactory(application); 
			inJSonFileObjectPersisterFactory.setAsyncSaveEnabled(true); 
			cacheManager.addPersister(inJSonFileObjectPersisterFactory); 
		} catch (CacheCreationException e) { 
			String error = "Unable to create cacheManager"; 
			Log.e(TAG_APPALOOSA, error); 
			e.printStackTrace(); 
		} 
 
		try { 
			InFileBigInputStreamObjectPersister inFileInputStreamObjectPersister; 
			inFileInputStreamObjectPersister = new InFileBigInputStreamObjectPersister(application); 
			cacheManager.addPersister(inFileInputStreamObjectPersister); 
		} catch (CacheCreationException e) { 
			String error = "Unable to create cacheManager"; 
5
CodeRank
See Code Examples for Android JacksonObjectPersisterFactory Methods: