// Utility class, no public or protected default constructor
}
public static void render(StringBuilder buffer, ErrorHandlerBuilder errorHandler) {
if (errorHandler instanceof DeadLetterChannelBuilder) {
DeadLetterChannelBuilder deadLetter = (DeadLetterChannelBuilder)errorHandler;
buffer.append("errorHandler(deadLetterChannel(\"").append(deadLetter.getDeadLetterUri()).append("\")");
// render the redelivery policy
RedeliveryPolicy redelivery = deadLetter.getRedeliveryPolicy();
int maxRedeliveries = redelivery.getMaximumRedeliveries();
if (maxRedeliveries != 0) {
buffer.append(".maximumRedeliveries(").append(maxRedeliveries).append(")");
}
long redeliverDelay = redelivery.getRedeliveryDelay();
if (redeliverDelay != 1000) {
buffer.append(".redeliverDelay(").append(redeliverDelay).append(")");
}
if (redelivery.isLogStackTrace()) {
buffer.append(".logStackTrace(true)");
}
// render the handled policy
if (deadLetter.getHandledPolicy() != null) {
String handledPolicy = deadLetter.getHandledPolicy().toString();
if (handledPolicy.equals("false")) {
buffer.append(".handled(").append(handledPolicy).append(")");
}
}