Skip to content

Commit 7c3515b

Browse files
committed
All setters in NioParams return the current instance
It was not the case for a couple of setters. Fixes #396
1 parent 5a7af10 commit 7c3515b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/com/rabbitmq/client/impl/nio/NioParams.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ public SocketChannelConfigurator getSocketChannelConfigurator() {
301301
* Nagle's algorithm.
302302
*
303303
* @param configurator the configurator to use
304+
* @return this {@link NioParams} instance
304305
*/
305-
public void setSocketChannelConfigurator(SocketChannelConfigurator configurator) {
306+
public NioParams setSocketChannelConfigurator(SocketChannelConfigurator configurator) {
306307
this.socketChannelConfigurator = configurator;
308+
return this;
307309
}
308310

309311
public SslEngineConfigurator getSslEngineConfigurator() {
@@ -318,9 +320,11 @@ public SslEngineConfigurator getSslEngineConfigurator() {
318320
* The default implementation doesn't do anything.
319321
*
320322
* @param configurator the configurator to use
323+
* @return this {@link NioParams} instance
321324
*/
322-
public void setSslEngineConfigurator(SslEngineConfigurator configurator) {
325+
public NioParams setSslEngineConfigurator(SslEngineConfigurator configurator) {
323326
this.sslEngineConfigurator = configurator;
327+
return this;
324328
}
325329

326330
public ExecutorService getConnectionShutdownExecutor() {

0 commit comments

Comments
 (0)