public B defaultChannelOptions() { channelOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); return returnBuilder(); }
public S build() { if (null == serverChannelClass) { serverChannelClass = defaultServerChannelClass(); EventLoopGroup acceptorGroup = serverBootstrap.group(); if (null == acceptorGroup) { configureDefaultEventloopGroup(); if (defaultServerChannelClass() == serverChannelClass) { configureDefaultEventloopGroup(); } else { appendPipelineConfigurator(PipelineConfigurators.<I, O>sslConfigurator(sslEngineFactory)); S server = createServer(); if (null != eventListenersFactory) { MetricEventsListener<? extends ServerMetricsEvent<?>> listener = newMetricsListener(eventListenersFactory, server); server.subscribe(listener);
public B pipelineConfigurator(PipelineConfigurator<I, O> pipelineConfigurator) { this.pipelineConfigurator = pipelineConfigurator; return returnBuilder(); }
protected AbstractServerBuilder(int port, T bootstrap, ConnectionHandler<I, O> connectionHandler) { if (null == connectionHandler) { throw new IllegalArgumentException("Connection handler can not be null"); } if (null == bootstrap) { throw new IllegalArgumentException("Server bootstrap can not be null"); } this.port = port; serverBootstrap = bootstrap; this.connectionHandler = connectionHandler; defaultChannelOptions(); }
public B appendPipelineConfigurator(PipelineConfigurator<I, O> additionalConfigurator) { return pipelineConfigurator(PipelineConfigurators.composeConfigurators(pipelineConfigurator, additionalConfigurator)); }
public S build() { if (null == serverChannelClass) { serverChannelClass = defaultServerChannelClass(); EventLoopGroup acceptorGroup = serverBootstrap.group(); if (null == acceptorGroup) { configureDefaultEventloopGroup(); if (defaultServerChannelClass() == serverChannelClass) { configureDefaultEventloopGroup(); } else { appendPipelineConfigurator(PipelineConfigurators.<I, O>sslConfigurator(sslEngineFactory)); S server = createServer(); if (null != eventListenersFactory) { MetricEventsListener<? extends ServerMetricsEvent<?>> listener = newMetricsListener(eventListenersFactory, server); server.subscribe(listener);
public B channel(Class<? extends C> serverChannelClass) { this.serverChannelClass = serverChannelClass; return returnBuilder(); }
protected AbstractServerBuilder(int port, T bootstrap, ConnectionHandler<I, O> connectionHandler) { if (null == connectionHandler) { throw new IllegalArgumentException("Connection handler can not be null"); } if (null == bootstrap) { throw new IllegalArgumentException("Server bootstrap can not be null"); } this.port = port; serverBootstrap = bootstrap; this.connectionHandler = connectionHandler; defaultChannelOptions(); }
public B appendPipelineConfigurator(PipelineConfigurator<I, O> additionalConfigurator) { return pipelineConfigurator(PipelineConfigurators.composeConfigurators(pipelineConfigurator, additionalConfigurator)); }
public B withSslEngineFactory(SSLEngineFactory sslEngineFactory) { this.sslEngineFactory = sslEngineFactory; return returnBuilder(); }
public B defaultChannelOptions() { channelOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); return returnBuilder(); }
@Override public UdpServerBuilder<I, O> defaultChannelOptions() { channelOption(ChannelOption.SO_BROADCAST, true); return super.defaultChannelOptions(); }
public B pipelineConfigurator(PipelineConfigurator<I, O> pipelineConfigurator) { this.pipelineConfigurator = pipelineConfigurator; return returnBuilder(); }
@Override public UdpServerBuilder<I, O> defaultChannelOptions() { channelOption(ChannelOption.SO_BROADCAST, true); return super.defaultChannelOptions(); }
public B withMetricEventsListenerFactory(MetricEventsListenerFactory eventListenersFactory) { this.eventListenersFactory = eventListenersFactory; return returnBuilder(); }
@Override public B defaultChannelOptions() { channelOption(ChannelOption.SO_KEEPALIVE, true); childChannelOption(ChannelOption.SO_KEEPALIVE, true); childChannelOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); return super.defaultChannelOptions(); } }
public B withSslEngineFactory(SSLEngineFactory sslEngineFactory) { this.sslEngineFactory = sslEngineFactory; return returnBuilder(); }
@Override public B defaultChannelOptions() { channelOption(ChannelOption.SO_KEEPALIVE, true); childChannelOption(ChannelOption.SO_KEEPALIVE, true); childChannelOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); return super.defaultChannelOptions(); } }
public B withMetricEventsListenerFactory(MetricEventsListenerFactory eventListenersFactory) { this.eventListenersFactory = eventListenersFactory; return returnBuilder(); }
public B channel(Class<? extends C> serverChannelClass) { this.serverChannelClass = serverChannelClass; return returnBuilder(); }