@Override
public void handleReadyNotification(final NotificationEvent notificationKey, final DateTime eventDate, final UUID userToken, final Long accountRecordId, final Long tenantRecordId) {
try {
if (!(notificationKey instanceof OverdueCheckNotificationKey)) {
log.error("Overdue service received Unexpected notificationKey {}", notificationKey.getClass().getName());
return;
}
final OverdueCheckNotificationKey key = (OverdueCheckNotificationKey) notificationKey;
dispatcher.processOverdueForAccount(key.getUuidKey(), createCallContext(userToken, accountRecordId, tenantRecordId));
} catch (IllegalArgumentException e) {
log.error("The key returned from the NextBillingNotificationQueue is not a valid UUID", e);
}
}
}