001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.model;
018
019import javax.xml.bind.annotation.XmlAccessType;
020import javax.xml.bind.annotation.XmlAccessorType;
021import javax.xml.bind.annotation.XmlAttribute;
022import javax.xml.bind.annotation.XmlRootElement;
023
024import org.apache.camel.CamelContext;
025import org.apache.camel.LoggingLevel;
026import org.apache.camel.processor.RedeliveryPolicy;
027import org.apache.camel.spi.Metadata;
028import org.apache.camel.util.CamelContextHelper;
029import org.apache.camel.util.ObjectHelper;
030
031/**
032 * To configure re-delivery for error handling
033 *
034 * @version 
035 */
036@Metadata(label = "configuration")
037@XmlRootElement(name = "redeliveryPolicy")
038@XmlAccessorType(XmlAccessType.FIELD)
039public class RedeliveryPolicyDefinition {
040    @XmlAttribute
041    private String maximumRedeliveries;
042    @XmlAttribute
043    private String redeliveryDelay;
044    @XmlAttribute
045    private String asyncDelayedRedelivery;
046    @XmlAttribute
047    private String backOffMultiplier;
048    @XmlAttribute
049    private String useExponentialBackOff;
050    @XmlAttribute
051    private String collisionAvoidanceFactor;
052    @XmlAttribute
053    private String useCollisionAvoidance;
054    @XmlAttribute
055    private String maximumRedeliveryDelay;
056    @XmlAttribute
057    private LoggingLevel retriesExhaustedLogLevel;
058    @XmlAttribute
059    private LoggingLevel retryAttemptedLogLevel;
060    @XmlAttribute
061    private String logRetryAttempted;
062    @XmlAttribute
063    private String logStackTrace;
064    @XmlAttribute
065    private String logRetryStackTrace;
066    @XmlAttribute
067    private String logHandled;
068    @XmlAttribute
069    private String logNewException;
070    @XmlAttribute
071    private String logContinued;
072    @XmlAttribute
073    private String logExhausted;
074    @XmlAttribute
075    private String logExhaustedMessageHistory;
076    @XmlAttribute
077    private String disableRedelivery;
078    @XmlAttribute
079    private String delayPattern;
080    @XmlAttribute
081    private String allowRedeliveryWhileStopping;
082    @XmlAttribute
083    private String exchangeFormatterRef;
084
085    public RedeliveryPolicy createRedeliveryPolicy(CamelContext context, RedeliveryPolicy parentPolicy) {
086
087        RedeliveryPolicy answer;
088        if (parentPolicy != null) {
089            answer = parentPolicy.copy();
090        } else {
091            answer = new RedeliveryPolicy();
092        }
093
094        try {
095
096            // copy across the properties - if they are set
097            if (maximumRedeliveries != null) {
098                answer.setMaximumRedeliveries(CamelContextHelper.parseInteger(context, maximumRedeliveries));
099            }
100            if (redeliveryDelay != null) {
101                answer.setRedeliveryDelay(CamelContextHelper.parseLong(context, redeliveryDelay));
102            }
103            if (asyncDelayedRedelivery != null) {
104                if (CamelContextHelper.parseBoolean(context, asyncDelayedRedelivery)) {
105                    answer.asyncDelayedRedelivery();
106                }
107            }
108            if (retriesExhaustedLogLevel != null) {
109                answer.setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
110            }
111            if (retryAttemptedLogLevel != null) {
112                answer.setRetryAttemptedLogLevel(retryAttemptedLogLevel);
113            }
114            if (backOffMultiplier != null) {
115                answer.setBackOffMultiplier(CamelContextHelper.parseDouble(context, backOffMultiplier));
116            }
117            if (useExponentialBackOff != null) {
118                answer.setUseExponentialBackOff(CamelContextHelper.parseBoolean(context, useExponentialBackOff));
119            }
120            if (collisionAvoidanceFactor != null) {
121                answer.setCollisionAvoidanceFactor(CamelContextHelper.parseDouble(context, collisionAvoidanceFactor));
122            }
123            if (useCollisionAvoidance != null) {
124                answer.setUseCollisionAvoidance(CamelContextHelper.parseBoolean(context, useCollisionAvoidance));
125            }
126            if (maximumRedeliveryDelay != null) {
127                answer.setMaximumRedeliveryDelay(CamelContextHelper.parseLong(context, maximumRedeliveryDelay));
128            }
129            if (logStackTrace != null) {
130                answer.setLogStackTrace(CamelContextHelper.parseBoolean(context, logStackTrace));
131            }
132            if (logRetryStackTrace != null) {
133                answer.setLogRetryStackTrace(CamelContextHelper.parseBoolean(context, logRetryStackTrace));
134            }
135            if (logHandled != null) {
136                answer.setLogHandled(CamelContextHelper.parseBoolean(context, logHandled));
137            }
138            if (logNewException != null) {
139                answer.setLogNewException(CamelContextHelper.parseBoolean(context, logNewException));
140            }
141            if (logContinued != null) {
142                answer.setLogContinued(CamelContextHelper.parseBoolean(context, logContinued));
143            }
144            if (logRetryAttempted != null) {
145                answer.setLogRetryAttempted(CamelContextHelper.parseBoolean(context, logRetryAttempted));
146            }
147            if (logExhausted != null) {
148                answer.setLogExhausted(CamelContextHelper.parseBoolean(context, logExhausted));
149            }
150            if (logExhaustedMessageHistory != null) {
151                answer.setLogExhaustedMessageHistory(CamelContextHelper.parseBoolean(context, logExhaustedMessageHistory));
152            }
153            if (disableRedelivery != null) {
154                if (CamelContextHelper.parseBoolean(context, disableRedelivery)) {
155                    answer.setMaximumRedeliveries(0);
156                }
157            }
158            if (delayPattern != null) {
159                answer.setDelayPattern(delayPattern);
160            }
161            if (allowRedeliveryWhileStopping != null) {
162                answer.setAllowRedeliveryWhileStopping(CamelContextHelper.parseBoolean(context, allowRedeliveryWhileStopping));
163            }
164            if (exchangeFormatterRef != null) {
165                answer.setExchangeFormatterRef(exchangeFormatterRef);
166            }
167        } catch (Exception e) {
168            throw ObjectHelper.wrapRuntimeCamelException(e);
169        }
170
171        return answer;
172    }
173
174    @Override
175    public String toString() {
176        return "RedeliveryPolicy[maximumRedeliveries: " + maximumRedeliveries + "]";
177    }
178    
179    // Fluent API
180    //-------------------------------------------------------------------------
181
182    /**
183     * Allow synchronous delayed redelivery.
184     *
185     * @return the builder
186     */
187    public RedeliveryPolicyDefinition asyncDelayedRedelivery() {
188        setAsyncDelayedRedelivery("true");
189        return this;
190    }
191
192    /**
193     * Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.
194     *
195     * @param allowRedeliveryWhileStopping <tt>true</tt> to allow redelivery, <tt>false</tt> to reject redeliveries
196     * @return the builder
197     */
198    public RedeliveryPolicyDefinition allowRedeliveryWhileStopping(boolean allowRedeliveryWhileStopping) {
199        return allowRedeliveryWhileStopping(Boolean.toString(allowRedeliveryWhileStopping));
200    }
201
202    /**
203     * Controls whether to allow redelivery while stopping/shutting down a route that uses error handling.
204     *
205     * @param allowRedeliveryWhileStopping <tt>true</tt> to allow redelivery, <tt>false</tt> to reject redeliveries
206     * @return the builder
207     */
208    public RedeliveryPolicyDefinition allowRedeliveryWhileStopping(String allowRedeliveryWhileStopping) {
209        setAllowRedeliveryWhileStopping(allowRedeliveryWhileStopping);
210        return this;
211    }
212
213    /**
214     * Sets the back off multiplier
215     *
216     * @param backOffMultiplier  the back off multiplier
217     * @return the builder
218     */
219    public RedeliveryPolicyDefinition backOffMultiplier(double backOffMultiplier) {
220        return backOffMultiplier(Double.toString(backOffMultiplier));
221    }
222
223    /**
224     * Sets the back off multiplier (supports property placeholders)
225     *
226     * @param backOffMultiplier  the back off multiplier
227     * @return the builder
228     */
229    public RedeliveryPolicyDefinition backOffMultiplier(String backOffMultiplier) {
230        setBackOffMultiplier(backOffMultiplier);
231        return this;
232    }
233
234    /**
235     * Sets the collision avoidance percentage
236     *
237     * @param collisionAvoidancePercent  the percentage
238     * @return the builder
239     */
240    public RedeliveryPolicyDefinition collisionAvoidancePercent(double collisionAvoidancePercent) {
241        setCollisionAvoidanceFactor(Double.toString(collisionAvoidancePercent * 0.01d));
242        return this;
243    }
244
245    /**
246     * Sets the collision avoidance factor
247     *
248     * @param collisionAvoidanceFactor  the factor
249     * @return the builder
250     */
251    public RedeliveryPolicyDefinition collisionAvoidanceFactor(double collisionAvoidanceFactor) {
252        return collisionAvoidanceFactor(Double.toString(collisionAvoidanceFactor));
253    }
254
255    /**
256     * Sets the collision avoidance factor (supports property placeholders)
257     *
258     * @param collisionAvoidanceFactor  the factor
259     * @return the builder
260     */
261    public RedeliveryPolicyDefinition collisionAvoidanceFactor(String collisionAvoidanceFactor) {
262        setCollisionAvoidanceFactor(collisionAvoidanceFactor);
263        return this;
264    }
265
266    /**
267     * Sets the initial redelivery delay
268     *
269     * @param delay  delay in millis
270     * @return the builder
271     */
272    public RedeliveryPolicyDefinition redeliveryDelay(long delay) {
273        return redeliveryDelay(Long.toString(delay));
274    }
275
276    /**
277     * Sets the initial redelivery delay (supports property placeholders)
278     *
279     * @param delay  delay in millis
280     * @return the builder
281     */
282    public RedeliveryPolicyDefinition redeliveryDelay(String delay) {
283        setRedeliveryDelay(delay);
284        return this;
285    }
286
287    /**
288     * Sets the logging level to use when retries has exhausted
289     *
290     * @param retriesExhaustedLogLevel  the logging level
291     * @return the builder
292     */
293    public RedeliveryPolicyDefinition retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
294        setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
295        return this;
296    }    
297    
298    /**
299     * Sets the logging level to use for logging retry attempts
300     *
301     * @param retryAttemptedLogLevel  the logging level
302     * @return the builder
303     */
304    public RedeliveryPolicyDefinition retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
305        setRetryAttemptedLogLevel(retryAttemptedLogLevel);
306        return this;
307    }
308
309    /**
310     * Sets whether stack traces should be logged.
311     * Can be used to include or reduce verbose.
312     *
313     * @param logStackTrace  whether stack traces should be logged or not
314     * @return the builder
315     */
316    public RedeliveryPolicyDefinition logStackTrace(boolean logStackTrace) {
317        return logStackTrace(Boolean.toString(logStackTrace));
318    }
319
320    /**
321     * Sets whether stack traces should be logged (supports property placeholders)
322     * Can be used to include or reduce verbose.
323     *
324     * @param logStackTrace  whether stack traces should be logged or not
325     * @return the builder
326     */
327    public RedeliveryPolicyDefinition logStackTrace(String logStackTrace) {
328        setLogStackTrace(logStackTrace);
329        return this;
330    }
331
332    /**
333     * Sets whether stack traces should be logged when an retry attempt failed.
334     * Can be used to include or reduce verbose.
335     *
336     * @param logRetryStackTrace  whether stack traces should be logged or not
337     * @return the builder
338     */
339    public RedeliveryPolicyDefinition logRetryStackTrace(boolean logRetryStackTrace) {
340        return logRetryStackTrace(Boolean.toString(logRetryStackTrace));
341    }
342
343    /**
344     * Sets whether stack traces should be logged when an retry attempt failed (supports property placeholders).
345     * Can be used to include or reduce verbose.
346     *
347     * @param logRetryStackTrace  whether stack traces should be logged or not
348     * @return the builder
349     */
350    public RedeliveryPolicyDefinition logRetryStackTrace(String logRetryStackTrace) {
351        setLogRetryStackTrace(logRetryStackTrace);
352        return this;
353    }
354
355    /**
356     * Sets whether retry attempts should be logged or not.
357     * Can be used to include or reduce verbose.
358     *
359     * @param logRetryAttempted  whether retry attempts should be logged or not
360     * @return the builder
361     */
362    public RedeliveryPolicyDefinition logRetryAttempted(boolean logRetryAttempted) {
363        return logRetryAttempted(Boolean.toString(logRetryAttempted));
364    }
365
366    /**
367     * Sets whether retry attempts should be logged or not (supports property placeholders).
368     * Can be used to include or reduce verbose.
369     *
370     * @param logRetryAttempted  whether retry attempts should be logged or not
371     * @return the builder
372     */
373    public RedeliveryPolicyDefinition logRetryAttempted(String logRetryAttempted) {
374        setLogRetryAttempted(logRetryAttempted);
375        return this;
376    }
377
378    /**
379     * Sets whether handled exceptions should be logged or not.
380     * Can be used to include or reduce verbose.
381     *
382     * @param logHandled  whether handled exceptions should be logged or not
383     * @return the builder
384     */
385    public RedeliveryPolicyDefinition logHandled(boolean logHandled) {
386        return logHandled(Boolean.toString(logHandled));
387    }
388
389    /**
390     * Sets whether handled exceptions should be logged or not (supports property placeholders).
391     * Can be used to include or reduce verbose.
392     *
393     * @param logHandled  whether handled exceptions should be logged or not
394     * @return the builder
395     */
396    public RedeliveryPolicyDefinition logHandled(String logHandled) {
397        setLogHandled(logHandled);
398        return this;
399    }
400
401    /**
402     * Sets whether new exceptions should be logged or not.
403     * Can be used to include or reduce verbose.
404     * <p/>
405     * A new exception is an exception that was thrown while handling a previous exception.
406     *
407     * @param logNewException  whether new exceptions should be logged or not
408     * @return the builder
409     */
410    public RedeliveryPolicyDefinition logNewException(boolean logNewException) {
411        return logNewException(Boolean.toString(logNewException));
412    }
413
414    /**
415     * Sets whether new exceptions should be logged or not (supports property placeholders).
416     * Can be used to include or reduce verbose.
417     * <p/>
418     * A new exception is an exception that was thrown while handling a previous exception.
419     *
420     * @param logNewException  whether new exceptions should be logged or not
421     * @return the builder
422     */
423    public RedeliveryPolicyDefinition logNewException(String logNewException) {
424        logNewException(logNewException);
425        return this;
426    }
427
428    /**
429     * Sets whether continued exceptions should be logged or not.
430     * Can be used to include or reduce verbose.
431     *
432     * @param logContinued  whether continued exceptions should be logged or not
433     * @return the builder
434     */
435    public RedeliveryPolicyDefinition logContinued(boolean logContinued) {
436        return logContinued(Boolean.toString(logContinued));
437    }
438
439    /**
440     * Sets whether continued exceptions should be logged or not (supports property placeholders).
441     * Can be used to include or reduce verbose.
442     *
443     * @param logContinued  whether continued exceptions should be logged or not
444     * @return the builder
445     */
446    public RedeliveryPolicyDefinition logContinued(String logContinued) {
447        setLogContinued(logContinued);
448        return this;
449    }
450
451    /**
452     * Sets whether exhausted exceptions should be logged or not.
453     * Can be used to include or reduce verbose.
454     *
455     * @param logExhausted  whether exhausted exceptions should be logged or not
456     * @return the builder
457     */
458    public RedeliveryPolicyDefinition logExhausted(boolean logExhausted) {
459        return logExhausted(Boolean.toString(logExhausted));
460    }
461
462    /**
463     * Sets whether exhausted exceptions should be logged or not (supports property placeholders).
464     * Can be used to include or reduce verbose.
465     *
466     * @param logExhausted  whether exhausted exceptions should be logged or not
467     * @return the builder
468     */
469    public RedeliveryPolicyDefinition logExhausted(String logExhausted) {
470        setLogExhausted(logExhausted);
471        return this;
472    }
473
474    /**
475     * Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders).
476     * Can be used to include or reduce verbose.
477     *
478     * @param logExhaustedMessageHistory  whether exhausted exceptions should be logged with message history
479     * @return the builder
480     */
481    public RedeliveryPolicyDefinition logExhaustedMessageHistory(boolean logExhaustedMessageHistory) {
482        setLogExhaustedMessageHistory(Boolean.toString(logExhaustedMessageHistory));
483        return this;
484    }
485
486    /**
487     * Sets whether exhausted exceptions should be logged including message history or not (supports property placeholders).
488     * Can be used to include or reduce verbose.
489     *
490     * @param logExhaustedMessageHistory  whether exhausted exceptions should be logged with message history
491     * @return the builder
492     */
493    public RedeliveryPolicyDefinition logExhaustedMessageHistory(String logExhaustedMessageHistory) {
494        setLogExhaustedMessageHistory(logExhaustedMessageHistory);
495        return this;
496    }
497
498    /**
499     * Sets the maximum redeliveries
500     * <ul>
501     *   <li>x = redeliver at most x times</li>
502     *   <li>0 = no redeliveries</li>
503     *   <li>-1 = redeliver forever</li>
504     * </ul>
505     *
506     * @param maximumRedeliveries  the value
507     * @return the builder
508     */
509    public RedeliveryPolicyDefinition maximumRedeliveries(int maximumRedeliveries) {
510        return maximumRedeliveries(Integer.toString(maximumRedeliveries));
511    }
512
513    /**
514     * Sets the maximum redeliveries (supports property placeholders)
515     * <ul>
516     *   <li>x = redeliver at most x times</li>
517     *   <li>0 = no redeliveries</li>
518     *   <li>-1 = redeliver forever</li>
519     * </ul>
520     *
521     * @param maximumRedeliveries  the value
522     * @return the builder
523     */
524    public RedeliveryPolicyDefinition maximumRedeliveries(String maximumRedeliveries) {
525        setMaximumRedeliveries(maximumRedeliveries);
526        return this;
527    }
528
529    /**
530     * Turn on collision avoidance.
531     *
532     * @return the builder
533     */
534    public RedeliveryPolicyDefinition useCollisionAvoidance() {
535        setUseCollisionAvoidance("true");
536        return this;
537    }
538
539    /**
540     * Turn on exponential backk off
541     *
542     * @return the builder
543     */
544    public RedeliveryPolicyDefinition useExponentialBackOff() {
545        setUseExponentialBackOff("true");
546        return this;
547    }
548
549    /**
550     * Sets the maximum delay between redelivery
551     *
552     * @param maximumRedeliveryDelay  the delay in millis
553     * @return the builder
554     */
555    public RedeliveryPolicyDefinition maximumRedeliveryDelay(long maximumRedeliveryDelay) {
556        return maximumRedeliveryDelay(Long.toString(maximumRedeliveryDelay));
557    }
558
559    /**
560     * Sets the maximum delay between redelivery (supports property placeholders)
561     *
562     * @param maximumRedeliveryDelay  the delay in millis
563     * @return the builder
564     */
565    public RedeliveryPolicyDefinition maximumRedeliveryDelay(String maximumRedeliveryDelay) {
566        setMaximumRedeliveryDelay(maximumRedeliveryDelay);
567        return this;
568    }
569
570    /**
571     * Sets the delay pattern with delay intervals.
572     *
573     * @param delayPattern the delay pattern
574     * @return the builder
575     */
576    public RedeliveryPolicyDefinition delayPattern(String delayPattern) {
577        setDelayPattern(delayPattern);
578        return this;
579    }
580    
581    /**
582     * Sets the reference of the instance of {@link org.apache.camel.spi.ExchangeFormatter} to generate the log message from exchange.
583     *
584     * @param exchangeFormatterRef name of the instance of {@link org.apache.camel.spi.ExchangeFormatter}
585     * @return the builder
586     */
587    public RedeliveryPolicyDefinition exchangeFormatterRef(String exchangeFormatterRef) {
588        setExchangeFormatterRef(exchangeFormatterRef);
589        return this;
590    }
591
592    // Properties
593    //-------------------------------------------------------------------------
594
595    public String getMaximumRedeliveries() {
596        return maximumRedeliveries;
597    }
598
599    public void setMaximumRedeliveries(String maximumRedeliveries) {
600        this.maximumRedeliveries = maximumRedeliveries;
601    }
602
603    public String getRedeliveryDelay() {
604        return redeliveryDelay;
605    }
606
607    public void setRedeliveryDelay(String redeliveryDelay) {
608        this.redeliveryDelay = redeliveryDelay;
609    }
610
611    public String getAsyncDelayedRedelivery() {
612        return asyncDelayedRedelivery;
613    }
614
615    public boolean isAsyncDelayedRedelivery(CamelContext context) {
616        if (getAsyncDelayedRedelivery() == null) {
617            return false;
618        }
619
620        try {
621            return CamelContextHelper.parseBoolean(context, getAsyncDelayedRedelivery());
622        } catch (Exception e) {
623            throw ObjectHelper.wrapRuntimeCamelException(e);
624        }
625    }
626
627    public void setAsyncDelayedRedelivery(String asyncDelayedRedelivery) {
628        this.asyncDelayedRedelivery = asyncDelayedRedelivery;
629    }
630
631    public String getBackOffMultiplier() {
632        return backOffMultiplier;
633    }
634
635    public void setBackOffMultiplier(String backOffMultiplier) {
636        this.backOffMultiplier = backOffMultiplier;
637    }
638
639    public String getUseExponentialBackOff() {
640        return useExponentialBackOff;
641    }
642
643    public void setUseExponentialBackOff(String useExponentialBackOff) {
644        this.useExponentialBackOff = useExponentialBackOff;
645    }
646
647    public String getCollisionAvoidanceFactor() {
648        return collisionAvoidanceFactor;
649    }
650
651    public void setCollisionAvoidanceFactor(String collisionAvoidanceFactor) {
652        this.collisionAvoidanceFactor = collisionAvoidanceFactor;
653    }
654
655    public String getUseCollisionAvoidance() {
656        return useCollisionAvoidance;
657    }
658
659    public void setUseCollisionAvoidance(String useCollisionAvoidance) {
660        this.useCollisionAvoidance = useCollisionAvoidance;
661    }
662
663    public String getMaximumRedeliveryDelay() {
664        return maximumRedeliveryDelay;
665    }
666
667    public void setMaximumRedeliveryDelay(String maximumRedeliveryDelay) {
668        this.maximumRedeliveryDelay = maximumRedeliveryDelay;
669    }
670
671    public LoggingLevel getRetriesExhaustedLogLevel() {
672        return retriesExhaustedLogLevel;
673    }
674
675    public void setRetriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
676        this.retriesExhaustedLogLevel = retriesExhaustedLogLevel;
677    }
678
679    public LoggingLevel getRetryAttemptedLogLevel() {
680        return retryAttemptedLogLevel;
681    }
682
683    public void setRetryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
684        this.retryAttemptedLogLevel = retryAttemptedLogLevel;
685    }
686
687    public String getLogRetryAttempted() {
688        return logRetryAttempted;
689    }
690
691    public void setLogRetryAttempted(String logRetryAttempted) {
692        this.logRetryAttempted = logRetryAttempted;
693    }
694
695    public String getLogStackTrace() {
696        return logStackTrace;
697    }
698
699    public void setLogStackTrace(String logStackTrace) {
700        this.logStackTrace = logStackTrace;
701    }
702
703    public String getLogRetryStackTrace() {
704        return logRetryStackTrace;
705    }
706
707    public void setLogRetryStackTrace(String logRetryStackTrace) {
708        this.logRetryStackTrace = logRetryStackTrace;
709    }
710
711    public String getLogHandled() {
712        return logHandled;
713    }
714
715    public void setLogHandled(String logHandled) {
716        this.logHandled = logHandled;
717    }
718
719    public String getLogNewException() {
720        return logNewException;
721    }
722
723    public void setLogNewException(String logNewException) {
724        this.logNewException = logNewException;
725    }
726
727    public String getLogContinued() {
728        return logContinued;
729    }
730
731    public void setLogContinued(String logContinued) {
732        this.logContinued = logContinued;
733    }
734
735    public String getLogExhausted() {
736        return logExhausted;
737    }
738
739    public void setLogExhausted(String logExhausted) {
740        this.logExhausted = logExhausted;
741    }
742
743    public String getLogExhaustedMessageHistory() {
744        return logExhaustedMessageHistory;
745    }
746
747    public void setLogExhaustedMessageHistory(String logExhaustedMessageHistory) {
748        this.logExhaustedMessageHistory = logExhaustedMessageHistory;
749    }
750
751    public String getDisableRedelivery() {
752        return disableRedelivery;
753    }
754
755    /**
756     * Disables redelivery (same as setting maximum redeliveries to 0)
757     */
758    public void setDisableRedelivery(String disableRedelivery) {
759        this.disableRedelivery = disableRedelivery;
760    }
761
762    public String getDelayPattern() {
763        return delayPattern;
764    }
765
766    public void setDelayPattern(String delayPattern) {
767        this.delayPattern = delayPattern;
768    }
769
770    public String getAllowRedeliveryWhileStopping() {
771        return allowRedeliveryWhileStopping;
772    }
773
774    public void setAllowRedeliveryWhileStopping(String allowRedeliveryWhileStopping) {
775        this.allowRedeliveryWhileStopping = allowRedeliveryWhileStopping;
776    }
777    
778    public String getExchangeFormatterRef() {
779        return exchangeFormatterRef;
780    }
781    
782    public void setExchangeFormatterRef(String exchangeFormatterRef) {
783        this.exchangeFormatterRef = exchangeFormatterRef;
784    }
785    
786    
787}