Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There is a <code>CompositeItemProcessListener</code> but this doesn't fit your requirement because - I think - your request is to have <code>SoDDataProcessorListener</code> called when <code>SoDDataProcessor</code> process an item and <code>SoDLogicProcessorListener</code> called when the item transformed from previous step pass into <code>SoDLogicProcessor</code>.<br/> This is not possible for two reasons:</p> <ol> <li><code>ItemProcessorListener</code> is called around your <code>CompositeItemProcessor</code> and not called around its delegated <code>ItemProcessor</code>s</li> <li><code>CompositeItemProcessListener</code> will run into a <code>ClassCastException</code> because is signature must be <code>CompositeItemProcessListener&lt;User,HashSet&lt;Object&gt;&gt;</code> and when receiving <code>HashSet&lt;String&gt;</code> will thrown an exception</li> </ol> <p>You have to resolve in another way, this depends by your needs; I'll give you just an idea for your question, but you can also reconsider your design to achieve the same result<br/></p> <p><em>My idea:</em><br/> Store intermediate transformed data in <code>StepExecutionContext</code>, write your own <code>ItemProcessorListener</code> that delegate each intermediate result to <code>SoDDataProcessorListener</code>, <code>SoDLogicProcessorListener</code> and others if you (will) have more and dispatch data to correct listener; in this way you can also write specific classes to mantain listeners separated.</p> <p>Hope can help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload