Example #1
0
 @Override
 public boolean onFired(ActionContext<? extends Application> context) {
   if (context.getApp().checkInternetAvailableAndRequired(context.getActivity())) {
     try {
       final SyncService service = syncServiceProxy.getService();
       if (service != null) {
         doSync(context, service);
       }
     } catch (IllegalStateException ex) {
       cancelSync(context);
     }
   }
   return true;
 }
Example #2
0
 public void onDestroy() {
   syncServiceProxy.removeListener(this);
 }
Example #3
0
 @Inject
 public SyncAction(SyncServiceProxy syncServiceProxy) {
   this.syncServiceProxy = syncServiceProxy;
   syncServiceProxy.addListener(this);
 }