private synchronized ErrorBounceState getState(String owningProcess) { if (state.containsKey(owningProcess)) { return state.get(owningProcess); } else { ErrorBounceState ebs = new ErrorBounceState(); state.put(owningProcess, ebs); return ebs; } }
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsReflected(); } } };
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsTranslated(); } } };
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { Set<T2Reference> errorReferences = new HashSet<T2Reference>(); for (T2Reference ei : jobEvent.getData().values()) { if (ei.containsErrors()) { errorReferences.add(ei); } } if (errorReferences.isEmpty()) { // relay the message down... getBelow().receiveJob(jobEvent); } else { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent, null, errorReferences); } }
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { for (EntityIdentifier ei : jobEvent.getData().values()) { if (ei instanceof ErrorDocumentIdentifier || (ei instanceof EntityListIdentifier && ((EntityListIdentifier) ei) .getContainsErrors())) { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent); return; } } // Got here so relay the message down... getBelow().receiveJob(jobEvent); }
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { Set<T2Reference> errorReferences = new HashSet<T2Reference>(); for (T2Reference ei : jobEvent.getData().values()) { if (ei.containsErrors()) { errorReferences.add(ei); } } if (errorReferences.isEmpty()) { // relay the message down... getBelow().receiveJob(jobEvent); } else { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent, null, errorReferences); } }
private synchronized ErrorBounceState getState(String owningProcess) { if (state.containsKey(owningProcess)) { return state.get(owningProcess); } else { ErrorBounceState ebs = new ErrorBounceState(); state.put(owningProcess, ebs); return ebs; } }
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsTranslated(); } } };
/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated(); sendErrorOutput(errorEvent); }
private synchronized ErrorBounceState getState(String owningProcess) { if (state.containsKey(owningProcess)) { return state.get(owningProcess); } else { ErrorBounceState ebs = new ErrorBounceState(); state.put(owningProcess, ebs); return ebs; } }
/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated(); sendErrorOutput(errorEvent, errorEvent.getCause(), null); }
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsReflected(); } } };
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsReflected(); } } };
public Integer getValue() throws NoSuchPropertyException { ErrorBounceState ebs = state.get(owningProcess); if (ebs == null) { return 0; } else { return ebs.getErrorsTranslated(); } } };
/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated();this. sendErrorOutput(errorEvent, errorEvent.getCause(), null); }