org.apache.camel.processor
Class Resequencer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.Resequencer
All Implemented Interfaces:
Runnable, Service

public class Resequencer
extends ServiceSupport
implements Runnable

An implementation of the Resequencer

Version:
$Revision: 1.1 $

Constructor Summary
Resequencer(Endpoint endpoint, Processor processor, Expression<Exchange> expression)
           
Resequencer(Endpoint endpoint, Processor processor, List<Expression<Exchange>> expressions)
           
Resequencer(Endpoint endpoint, Processor processor, Set<Exchange> set)
           
 
Method Summary
protected static Set<Exchange> createSet(Comparator<? super Exchange> comparator)
           
protected static Set<Exchange> createSet(Expression<Exchange> expression)
           
protected static Set<Exchange> createSet(List<Expression<Exchange>> expressions)
           
protected  void doStart()
           
protected  void doStop()
           
 int getBatchSize()
           
 long getBatchTimeout()
           
 ExceptionHandler getExceptionHandler()
           
protected  void processBatch()
          A transactional method to process a batch of messages up to a timeout period or number of messages reached.
 void run()
           
 void setBatchSize(int batchSize)
           
 void setBatchTimeout(long batchTimeout)
           
 void setExceptionHandler(ExceptionHandler exceptionHandler)
           
 String toString()
           
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
isStarted, isStopped, isStopping, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resequencer

public Resequencer(Endpoint endpoint,
                   Processor processor,
                   Expression<Exchange> expression)

Resequencer

public Resequencer(Endpoint endpoint,
                   Processor processor,
                   List<Expression<Exchange>> expressions)

Resequencer

public Resequencer(Endpoint endpoint,
                   Processor processor,
                   Set<Exchange> set)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

run

public void run()
Specified by:
run in interface Runnable

getExceptionHandler

public ExceptionHandler getExceptionHandler()

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)

getBatchSize

public int getBatchSize()

setBatchSize

public void setBatchSize(int batchSize)

getBatchTimeout

public long getBatchTimeout()

setBatchTimeout

public void setBatchTimeout(long batchTimeout)

processBatch

protected void processBatch()
                     throws Exception
A transactional method to process a batch of messages up to a timeout period or number of messages reached.

Throws:
Exception

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

createSet

protected static Set<Exchange> createSet(Expression<Exchange> expression)

createSet

protected static Set<Exchange> createSet(List<Expression<Exchange>> expressions)

createSet

protected static Set<Exchange> createSet(Comparator<? super Exchange> comparator)


Copyright © 2007 Apache Software Foundation. All Rights Reserved.