Prepare for Reactor 2.0.6
This commit is contained in:
parent
faa2f5cc50
commit
c75206f975
|
|
@ -63,7 +63,7 @@ configure(allprojects) { project ->
|
|||
ext.openjpaVersion = "2.4.0"
|
||||
ext.poiVersion = "3.12"
|
||||
ext.protobufVersion = "2.6.1"
|
||||
ext.reactorVersion = "2.0.5.RELEASE"
|
||||
ext.reactorVersion = "2.0.6.BUILD-SNAPSHOT"
|
||||
ext.romeVersion = "1.5.1"
|
||||
ext.seleniumVersion = "2.47.1"
|
||||
ext.slf4jVersion = "1.7.12"
|
||||
|
|
@ -131,6 +131,7 @@ configure(allprojects) { project ->
|
|||
repositories {
|
||||
maven { url "https://repo.spring.io/libs-release" }
|
||||
maven { url "https://repo.spring.io/milestone" }
|
||||
maven { url "https://repo.spring.io/snapshot" } // reactor 2.0.6 snapshot
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,11 @@ package org.springframework.messaging.tcp.reactor;
|
|||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.FutureListener;
|
||||
|
|
@ -76,7 +78,7 @@ public class Reactor2TcpClient<P> implements TcpOperations<P> {
|
|||
public static final Class<NettyTcpClient> REACTOR_TCP_CLIENT_TYPE = NettyTcpClient.class;
|
||||
|
||||
|
||||
private final NioEventLoopGroup eventLoopGroup;
|
||||
private final EventLoopGroup eventLoopGroup;
|
||||
|
||||
private final TcpClientFactory<Message<P>, Message<P>> tcpClientSpecFactory;
|
||||
|
||||
|
|
@ -99,7 +101,10 @@ public class Reactor2TcpClient<P> implements TcpOperations<P> {
|
|||
* @param codec the codec to use for encoding and decoding the TCP stream
|
||||
*/
|
||||
public Reactor2TcpClient(final String host, final int port, final Codec<Buffer, Message<P>, Message<P>> codec) {
|
||||
this.eventLoopGroup = initEventLoopGroup();
|
||||
|
||||
// Reactor 2.0.5 required NioEventLoopGroup (2.0.6 changed to EventLoopGroup)
|
||||
final NioEventLoopGroup nioEventLoopGroup = initEventLoopGroup();
|
||||
this.eventLoopGroup = nioEventLoopGroup;
|
||||
|
||||
this.tcpClientSpecFactory = new TcpClientFactory<Message<P>, Message<P>>() {
|
||||
@Override
|
||||
|
|
@ -108,7 +113,7 @@ public class Reactor2TcpClient<P> implements TcpOperations<P> {
|
|||
.env(new Environment(new SynchronousDispatcherConfigReader()))
|
||||
.codec(codec)
|
||||
.connect(host, port)
|
||||
.options(new NettyClientSocketOptions().eventLoopGroup(eventLoopGroup));
|
||||
.options(new NettyClientSocketOptions().eventLoopGroup(nioEventLoopGroup));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -244,7 +249,8 @@ public class Reactor2TcpClient<P> implements TcpOperations<P> {
|
|||
|
||||
@Override
|
||||
public ReactorConfiguration read() {
|
||||
return new ReactorConfiguration(Arrays.<DispatcherConfiguration>asList(), "sync", new Properties());
|
||||
return new ReactorConfiguration(Collections.<DispatcherConfiguration>emptyList(),
|
||||
"sync", new Properties());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue