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