@Override public String debugDump() { return debugDump(0); }
@Override public void notifyFailure(ResourceOperationDescription failureDescription, Task task, OperationResult parentResult) { Validate.notNull(failureDescription, "Operation description of resource object shadow must not be null."); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Resource operation failure notification\n{} ", failureDescription.debugDump()); } failureDescription.checkConsistence(); if ((null != operationListeners) && (!operationListeners.isEmpty())) { for (ResourceOperationListener listener : new ArrayList<>(operationListeners)) { // sometimes there is registration/deregistration from within //LOGGER.trace("Listener: {}", listener.getClass().getSimpleName()); try { listener.notifyFailure(failureDescription, task, parentResult); } catch (RuntimeException e) { LOGGER.error("Exception {} thrown by operation failure listener {}: {}-{}", new Object[]{ e.getClass(), listener.getName(), e.getMessage(), e }); parentResult.createSubresult(CLASS_NAME_WITH_DOT + "notifyFailure") .recordWarning("Operation failure listener has thrown unexpected exception", e); } } } else { LOGGER.debug("Operation failure received but listener list is empty, there is nobody to get the message"); } }
@Override public void notifySuccess(ResourceOperationDescription successDescription, Task task, OperationResult parentResult) { Validate.notNull(successDescription, "Operation description of resource object shadow must not be null."); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Resource operation success notification\n{} ", successDescription.debugDump()); } successDescription.checkConsistence(); if ((null != operationListeners) && (!operationListeners.isEmpty())) { for (ResourceOperationListener listener : new ArrayList<>(operationListeners)) { // sometimes there is registration/deregistration from within //LOGGER.trace("Listener: {}", listener.getClass().getSimpleName()); try { listener.notifySuccess(successDescription, task, parentResult); } catch (RuntimeException e) { LOGGER.error("Exception {} thrown by operation success listener {}: {}-{}", new Object[]{ e.getClass(), listener.getName(), e.getMessage(), e }); parentResult.createSubresult(CLASS_NAME_WITH_DOT + "notifySuccess") .recordWarning("Operation success listener has thrown unexpected exception", e); } } } else { LOGGER.debug("Operation success received but listener list is empty, there is nobody to get the message"); } }
@Override public void notifyInProgress(ResourceOperationDescription inProgressDescription, Task task, OperationResult parentResult) { Validate.notNull(inProgressDescription, "Operation description of resource object shadow must not be null."); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Resource operation in-progress notification\n{} ", inProgressDescription.debugDump()); } inProgressDescription.checkConsistence(); if ((null != operationListeners) && (!operationListeners.isEmpty())) { for (ResourceOperationListener listener : new ArrayList<>(operationListeners)) { // sometimes there is registration/deregistration from within //LOGGER.trace("Listener: {}", listener.getClass().getSimpleName()); try { listener.notifyInProgress(inProgressDescription, task, parentResult); } catch (RuntimeException e) { LOGGER.error("Exception {} thrown by operation in-progress listener {}: {}-{}", new Object[]{ e.getClass(), listener.getName(), e.getMessage(), e }); parentResult.createSubresult(CLASS_NAME_WITH_DOT + "notifyInProgress") .recordWarning("Operation in-progress listener has thrown unexpected exception", e); } } } else { LOGGER.debug("Operation in-progress received but listener list is empty, there is nobody to get the message"); } }
body.append("----------------------------------------\n"); body.append("Technical information:\n\n"); body.append(rod.debugDump(2));
event.getAccountOperationDescription().getCurrentShadow(), null)); } catch (SchemaException e) { LoggingUtils.logUnexpectedException(LOGGER, "Unable to determine the shadow change; operation = {}", e, event.getAccountOperationDescription().debugDump()); rv.append("(unable to determine the change because of schema exception: ").append(e.getMessage()).append(")\n");
private void executeNotifyAny(OperationStatus status, ResourceOperationDescription operationDescription, Task task, OperationResult result) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("AccountOperationListener.notify ({}) called with operationDescription = {}", status, operationDescription.debugDump()); } if (operationDescription.getObjectDelta() == null) { LOGGER.warn("Object delta is null, exiting the change listener."); return; } if (operationDescription.getCurrentShadow() == null) { LOGGER.warn("Current shadow is null, exiting the change listener."); return; } // for the time being, we deal only with accounts here if (operationDescription.getObjectDelta().getObjectTypeClass() == null || !ShadowType.class.isAssignableFrom(operationDescription.getObjectDelta().getObjectTypeClass())) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Object that was changed was not an account, exiting the operation listener (class = {})", operationDescription.getObjectDelta().getObjectTypeClass()); } return; } ResourceObjectEvent request = createRequest(status, operationDescription, task, result); notificationManager.processEvent(request, task, result); }
private void notifyOp(String notificationDesc, ResourceOperationDescription opDescription, Task task, OperationResult parentResult, boolean failure) { LOGGER.debug("Notify "+notificationDesc+" mock called with:\n{}", opDescription.debugDump());