Skip to content

Commit 8d3d871

Browse files
garyrussellartembilan
authored andcommitted
GH-3343: Fluent API for CharacterStreamWritingMH
Resolves #3343
1 parent ebec500 commit 8d3d871

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

spring-integration-stream/src/main/java/org/springframework/integration/stream/CharacterStreamWritingMessageHandler.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -124,6 +124,17 @@ public void setShouldAppendNewLine(boolean shouldAppendNewLine) {
124124
this.shouldAppendNewLine = shouldAppendNewLine;
125125
}
126126

127+
/**
128+
* Fluent api for {@link #setShouldAppendNewLine(boolean)}.
129+
* @param append true to append a newline.
130+
* @return this.
131+
* @since 5.4
132+
*/
133+
public CharacterStreamWritingMessageHandler appendNewLine(boolean append) {
134+
setShouldAppendNewLine(append);
135+
return this;
136+
}
137+
127138
@Override
128139
public String getComponentType() {
129140
return "stream:outbound-channel-adapter(character)";

0 commit comments

Comments
 (0)