@Override public void afterChunkError(ChunkContext context) { try { chunkListener.afterChunkError(context); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterFailedChunk.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeStepExecutionListener#afterStep(StepExecution) */ @Override public ExitStatus afterStep(StepExecution stepExecution) { try { return stepListener.afterStep(stepExecution); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterStep.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeItemReadListener#onReadError(java.lang.Exception) */ @Override public void onReadError(Exception ex) { try { itemReadListener.onReadError(ex); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in onReadError.", e); } }
/** * @see ItemWriteListener#onWriteError(Exception, List) */ @Override public void onWriteError(Exception ex, List<? extends S> items) { try { itemWriteListener.onWriteError(ex, items); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in onWriteError.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeStepExecutionListener#beforeStep(org.springframework.batch.core.StepExecution) */ @Override public void beforeStep(StepExecution stepExecution) { try { stepListener.beforeStep(stepExecution); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeStep.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeItemProcessListener#onProcessError(java.lang.Object, * java.lang.Exception) */ @Override public void onProcessError(T item, Exception ex) { try { itemProcessListener.onProcessError(item, ex); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in onProcessError.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeItemProcessListener#afterProcess(java.lang.Object, * java.lang.Object) */ @Override public void afterProcess(T item, @Nullable S result) { try { itemProcessListener.afterProcess(item, result); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterProcess.", getTargetException(e)); } }
/** * @see org.springframework.batch.core.listener.CompositeItemProcessListener#beforeProcess(java.lang.Object) */ @Override public void beforeProcess(T item) { try { itemProcessListener.beforeProcess(item); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeProcess.", getTargetException(e)); } }
/** * @see org.springframework.batch.core.listener.CompositeChunkListener#afterChunk(ChunkContext context) */ @Override public void afterChunk(ChunkContext context) { try { chunkListener.afterChunk(context); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterChunk.", getTargetException(e)); } }
/** * @see org.springframework.batch.core.listener.CompositeChunkListener#beforeChunk(ChunkContext context) */ @Override public void beforeChunk(ChunkContext context) { try { chunkListener.beforeChunk(context); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeChunk.", getTargetException(e)); } }
/** * @see org.springframework.batch.core.listener.CompositeItemReadListener#afterRead(java.lang.Object) */ @Override public void afterRead(T item) { try { itemReadListener.afterRead(item); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterRead.", getTargetException(e)); } }
/** * @see org.springframework.batch.core.listener.CompositeItemReadListener#beforeRead() */ @Override public void beforeRead() { try { itemReadListener.beforeRead(); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeRead.", getTargetException(e)); } }
/** * @see ItemWriteListener#afterWrite(List) */ @Override public void afterWrite(List<? extends S> items) { try { itemWriteListener.afterWrite(items); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterWrite.", getTargetException(e)); } }
/** * @see ItemWriteListener#beforeWrite(List) */ @Override public void beforeWrite(List<? extends S> items) { try { itemWriteListener.beforeWrite(items); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeWrite.", getTargetException(e)); } }
@Test public void testExceptionStringThrowable() throws Exception { Exception exception = new StepListenerFailedException("foo", new IllegalStateException("bar")); assertEquals("foo", exception.getMessage().substring(0, 3)); } }
/** * @see org.springframework.batch.core.listener.CompositeItemReadListener#onReadError(java.lang.Exception) */ @Override public void onReadError(Exception ex) { try { itemReadListener.onReadError(ex); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in onReadError.", e); } }
/** * @see org.springframework.batch.core.listener.CompositeStepExecutionListener#afterStep(StepExecution) */ @Override public ExitStatus afterStep(StepExecution stepExecution) { try { return stepListener.afterStep(stepExecution); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterStep.", e); } }
/** * * @see org.springframework.batch.core.listener.CompositeItemReadListener#beforeRead() */ public void beforeRead() { try { itemReadListener.beforeRead(); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeRead.", e); } }
/** * @param item * @see org.springframework.batch.core.listener.CompositeItemProcessListener#beforeProcess(java.lang.Object) */ public void beforeProcess(T item) { try { itemProcessListener.beforeProcess(item); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in beforeProcess.", e); } }
/** * @see ItemWriteListener#afterWrite(List) */ @Override public void afterWrite(List<? extends S> items) { try { itemWriteListener.afterWrite(items); } catch (RuntimeException e) { throw new StepListenerFailedException("Error in afterWrite.", getTargetException(e)); } }