@Override public void onCreate() { super.onCreate(); try { cacheManager = createCacheManager(getApplication()); } catch (CacheCreationException e) { Ln.e(e); stopSelf(); return; } if (cacheManager == null) { Ln.e(new CacheCreationException("createCacheManager() can't create a null cacheManager")); stopSelf(); return; } progressReporter = createRequestRequestListenerNotifier(); spiceServiceListenerNotifier = createSpiceServiceListenerNotifier(); final ExecutorService executorService = getExecutorService(); final NetworkStateChecker networkStateChecker = getNetworkStateChecker(); requestProcessor = createRequestProcessor(executorService, networkStateChecker); requestProcessor.setFailOnCacheError(DEFAULT_FAIL_ON_CACHE_ERROR); notification = createDefaultNotification(); Ln.d("SpiceService instance created."); }
@Override public void onDestroy() { Ln.d("SpiceService instance destroyed."); super.onDestroy(); }
@Override public Contributor loadDataFromNetwork() { Ln.d("Call web service "); return getService().createAccount(RUC); }