/** * Notification handler. Checking type of notification and call needed obtainer. * */ private final void onNotification(Notification notification) { if (notification instanceof ParcelNotification) { obtainParcelCommonNotification((ParcelNotification) notification); } else if (notification instanceof ResyncNotification) { obtainResyncNotification((ResyncNotification) notification); } else if (notification instanceof ItemNotification) { obtainCommonNotification((ItemNotification) notification); } else if (notification instanceof CallbackNotification) { callbackService.obtainCallbackNotification((CallbackNotification) notification); } }