io.reactivex.netty.RxNetty.newUdpServerBuilder()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中io.reactivex.netty.RxNetty.newUdpServerBuilder方法的一些代码示例,展示了RxNetty.newUdpServerBuilder的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RxNetty.newUdpServerBuilder方法的具体详情如下:
包路径:io.reactivex.netty.RxNetty
类名称:RxNetty
方法名:newUdpServerBuilder

RxNetty.newUdpServerBuilder介绍

暂无

代码示例

代码示例来源:origin: io.reactivex/rxnetty

public static <I, O> UdpServer<I, O> createUdpServer(final int port, PipelineConfigurator<I, O> pipelineConfigurator,
                           ConnectionHandler<I, O> connectionHandler) {
  return newUdpServerBuilder(port, connectionHandler).pipelineConfigurator(pipelineConfigurator).build();
}

代码示例来源:origin: com.netflix.rxnetty/rx-netty

public static <I, O> UdpServer<I, O> createUdpServer(final int port, PipelineConfigurator<I, O> pipelineConfigurator,
                           ConnectionHandler<I, O> connectionHandler) {
  return newUdpServerBuilder(port, connectionHandler).pipelineConfigurator(pipelineConfigurator).build();
}

代码示例来源:origin: com.netflix.karyon/karyon2-governator

/**
 * Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
 * handling to {@link ConnectionHandler}.
 * The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
 *
 * @param port Port for the server.
 * @param handler Connection Handler
 * @param bootstrapModules Additional bootstrapModules if any.
 *
 * @return {@link KaryonServer} which is to be used to start the created server.
 */
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
                          BootstrapModule... bootstrapModules) {
  UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
  return new RxNettyServerBackedServer(server, bootstrapModules);
}

代码示例来源:origin: com.netflix.karyon/karyon-governator

/**
 * Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
 * handling to {@link ConnectionHandler}.
 * The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
 *
 * @param port Port for the server.
 * @param handler Connection Handler
 * @param suites Additional suites if any.
 *
 * @return {@link KaryonServer} which is to be used to start the created server.
 */
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
                          LifecycleInjectorBuilderSuite... suites) {
  UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
  return new RxNettyServerBackedServer(server, suites);
}

代码示例来源:origin: com.netflix.karyon2/karyon-governator

/**
 * Creates a new {@link KaryonServer} that has a single UDP server instance which delegates all connection
 * handling to {@link ConnectionHandler}.
 * The {@link RxServer} is created using {@link RxNetty#newUdpServerBuilder(int, ConnectionHandler)}
 *
 * @param port Port for the server.
 * @param handler Connection Handler
 * @param bootstrapModules Additional bootstrapModules if any.
 *
 * @return {@link KaryonServer} which is to be used to start the created server.
 */
public static KaryonServer forUdpConnectionHandler(int port, ConnectionHandler<ByteBuf, ByteBuf> handler,
                          BootstrapModule... bootstrapModules) {
  UdpServer<ByteBuf, ByteBuf> server = RxNetty.newUdpServerBuilder(port, handler).build();
  return new RxNettyServerBackedServer(server, bootstrapModules);
}

相关文章