public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception {
setHandledFromExpressionType(routeContext);
setRetryUntilFromExpressionType(routeContext);
// lets attach a processor to an error handler
errorHandler = routeContext.createProcessor(this);
ErrorHandlerBuilder builder = routeContext.getRoute().getErrorHandlerBuilder();
builder.addErrorHandlers(this);
// lookup onRedelivery if ref is provided
if (ObjectHelper.isNotEmpty(onRedeliveryRef)) {
onRedelivery = routeContext.lookup(onRedeliveryRef, Processor.class);
}