本文整理了Java中io.reactivex.netty.RxNetty.newTcpClientBuilder
方法的一些代码示例,展示了RxNetty.newTcpClientBuilder
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RxNetty.newTcpClientBuilder
方法的具体详情如下:
包路径:io.reactivex.netty.RxNetty
类名称:RxNetty
方法名:newTcpClientBuilder
暂无
代码示例来源:origin: com.netflix.rxnetty/rx-netty
public static RxClient<ByteBuf, ByteBuf> createTcpClient(String host, int port) {
return RxNetty.<ByteBuf, ByteBuf>newTcpClientBuilder(host, port).build();
}
代码示例来源:origin: io.reactivex/rxnetty
public static RxClient<ByteBuf, ByteBuf> createTcpClient(String host, int port) {
return RxNetty.<ByteBuf, ByteBuf>newTcpClientBuilder(host, port).build();
}
代码示例来源:origin: com.netflix.eureka2/eureka-write-server
public ReplicationTransportClient(InetSocketAddress address, Codec codec, MessageConnectionMetrics metrics) {
this.address = address;
this.metrics = metrics;
this.rxClient = RxNetty.newTcpClientBuilder(address.getHostName(), address.getPort())
.pipelineConfigurator(EurekaTransports.replicationPipeline(codec))
.build();
}
代码示例来源:origin: io.reactivex/rxnetty
public static <I, O> RxClient<I, O> createTcpClient(String host, int port, PipelineConfigurator<O, I> configurator) {
return RxNetty.<I, O>newTcpClientBuilder(host, port).pipelineConfigurator(configurator).build();
}
代码示例来源:origin: com.netflix.rxnetty/rx-netty
public static <I, O> RxClient<I, O> createTcpClient(String host, int port, PipelineConfigurator<O, I> configurator) {
return RxNetty.<I, O>newTcpClientBuilder(host, port).pipelineConfigurator(configurator).build();
}
代码示例来源:origin: com.netflix.eureka/eureka2-write-server
public ReplicationTransportClient(EurekaTransportConfig config,
Server address,
MessageConnectionMetrics metrics) {
this.config = config;
this.address = address;
this.metrics = metrics;
this.rxClient = RxNetty.newTcpClientBuilder(address.getHost(), address.getPort())
.pipelineConfigurator(EurekaTransports.replicationPipeline(config.getCodec()))
.withNoConnectionPooling() // never pool as the address may be bound to different servers in the cloud
.build();
}
代码示例来源:origin: com.netflix.ribbon/ribbon-transport
@Override
protected RxClient<I, O> createRxClient(Server server) {
ClientBuilder<I, O> builder = RxNetty.newTcpClientBuilder(server.getHost(), server.getPort());
if (pipelineConfigurator != null) {
builder.pipelineConfigurator(pipelineConfigurator);
}
Integer connectTimeout = getProperty(IClientConfigKey.Keys.ConnectTimeout, null, DefaultClientConfigImpl.DEFAULT_CONNECT_TIMEOUT);
builder.channelOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeout);
if (isPoolEnabled()) {
builder.withConnectionPoolLimitStrategy(poolStrategy)
.withIdleConnectionsTimeoutMillis(idleConnectionEvictionMills)
.withPoolIdleCleanupScheduler(poolCleanerScheduler);
} else {
builder.withNoConnectionPooling();
}
RxClient<I, O> client = builder.build();
return client;
}
内容来源于网络,如有侵权,请联系作者删除!