GH-3343: Fluent API for CharacterStreamWritingMH

Resolves https://github.com/spring-projects/spring-integration/issues/3343
This commit is contained in:
Gary Russell
2020-07-17 10:28:38 -04:00
committed by Artem Bilan
parent ebec500abd
commit 8d3d871996

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,6 +124,17 @@ public class CharacterStreamWritingMessageHandler extends AbstractMessageHandler
this.shouldAppendNewLine = shouldAppendNewLine;
}
/**
* Fluent api for {@link #setShouldAppendNewLine(boolean)}.
* @param append true to append a newline.
* @return this.
* @since 5.4
*/
public CharacterStreamWritingMessageHandler appendNewLine(boolean append) {
setShouldAppendNewLine(append);
return this;
}
@Override
public String getComponentType() {
return "stream:outbound-channel-adapter(character)";