*
* @param processor next processor that processes re-ordered exchanges.
* @param comparator a sequence element comparator for exchanges.
*/
public StreamResequencer(Processor processor, SequenceElementComparator<Exchange> comparator) {
this.exceptionHandler = new LoggingExceptionHandler(getClass());
this.engine = new ResequencerEngine<Exchange>(comparator);
this.engine.setSequenceSender(this);
this.processor = processor;
}