org.apache.flink.shaded.netty4.io.netty.bootstrap.ServerBootstrap Java Examples
The following examples show how to use
org.apache.flink.shaded.netty4.io.netty.bootstrap.ServerBootstrap.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private Channel createServerChannel(final ChannelHandler... handlers) throws UnknownHostException, InterruptedException { ServerBootstrap bootstrap = new ServerBootstrap() // Bind address and port .localAddress(InetAddress.getLocalHost(), 0) // NIO server channels .group(nioGroup) .channel(NioServerSocketChannel.class) // See initializer for pipeline details .childHandler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline() .addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4)) .addLast(handlers); } }); return bootstrap.bind().sync().channel(); }
Example #2
Source File: ClientTest.java From flink with Apache License 2.0 | 6 votes |
private Channel createServerChannel(final ChannelHandler... handlers) throws UnknownHostException, InterruptedException { ServerBootstrap bootstrap = new ServerBootstrap() // Bind address and port .localAddress(InetAddress.getLocalHost(), 0) // NIO server channels .group(nioGroup) .channel(NioServerSocketChannel.class) // See initializer for pipeline details .childHandler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline() .addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4)) .addLast(handlers); } }); return bootstrap.bind().sync().channel(); }
Example #3
Source File: ClientTest.java From flink with Apache License 2.0 | 6 votes |
private Channel createServerChannel(final ChannelHandler... handlers) throws UnknownHostException, InterruptedException { ServerBootstrap bootstrap = new ServerBootstrap() // Bind address and port .localAddress(InetAddress.getLocalHost(), 0) // NIO server channels .group(nioGroup) .channel(NioServerSocketChannel.class) // See initializer for pipeline details .childHandler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline() .addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4)) .addLast(handlers); } }); return bootstrap.bind().sync().channel(); }
Example #4
Source File: WebFrontendBootstrap.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public ServerBootstrap getBootstrap() { return bootstrap; }
Example #5
Source File: NettyServer.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
ServerBootstrap getBootstrap() { return bootstrap; }
Example #6
Source File: WebFrontendBootstrap.java From flink with Apache License 2.0 | 4 votes |
public ServerBootstrap getBootstrap() { return bootstrap; }
Example #7
Source File: NettyServer.java From flink with Apache License 2.0 | 4 votes |
ServerBootstrap getBootstrap() { return bootstrap; }
Example #8
Source File: WebFrontendBootstrap.java From flink with Apache License 2.0 | 4 votes |
public ServerBootstrap getBootstrap() { return bootstrap; }
Example #9
Source File: NettyServer.java From flink with Apache License 2.0 | 4 votes |
ServerBootstrap getBootstrap() { return bootstrap; }