/** * Surrounds the actual write call with listener callbacks. * * @param items list of items to be written. * @throws Exception thrown if error occurs. */ protected final void doWrite(List<O> items) throws Exception { if (itemWriter == null) { return; } try { listener.beforeWrite(items); writeItems(items); doAfterWrite(items); } catch (Exception e) { doOnWriteError(e, items); throw e; } }
/** * Surrounds the actual write call with listener callbacks. * * @param items list of items to be written. * @throws Exception thrown if error occurs. */ protected final void doWrite(List<O> items) throws Exception { if (itemWriter == null) { return; } try { listener.beforeWrite(items); writeItems(items); doAfterWrite(items); } catch (Exception e) { doOnWriteError(e, items); throw e; } }
/** * Surrounds the actual write call with listener callbacks. * * @param items list of items to be written. * @throws Exception thrown if error occurs. */ protected final void doWrite(List<O> items) throws Exception { if (itemWriter == null) { return; } try { listener.beforeWrite(items); writeItems(items); doAfterWrite(items); } catch (Exception e) { doOnWriteError(e, items); throw e; } }
/** * Surrounds the actual write call with listener callbacks. * * @param items * @throws Exception */ protected final void doWrite(List<O> items) throws Exception { if (itemWriter==null) { return; } try { listener.beforeWrite(items); writeItems(items); doAfterWrite(items); } catch (Exception e) { listener.onWriteError(e, items); throw e; } }
/** * Surrounds the actual write call with listener callbacks. * * @param items * @throws Exception */ protected final void doWrite(List<O> items) throws Exception { if (itemWriter == null) { return; } try { listener.beforeWrite(items); writeItems(items); doAfterWrite(items); } catch (Exception e) { doOnWriteError(e, items); throw e; } }