@Test(timeout = 60000) public void testChannelOption() throws Exception { TcpClientImpl<String, String> client = TcpClientImpl._create(state, new TcpClientEventPublisher()); ClientState<String, String> state = client.getClientState(); TcpClientImpl<String, String> newClient = (TcpClientImpl<String, String>) client.channelOption(ChannelOption.AUTO_READ, true); assertDeepClientCopy(client, newClient); verify(state).channelOption(ChannelOption.AUTO_READ, true); }
@Override public <T> TcpClient<W, R> channelOption(ChannelOption<T> option, T value) { return copy(state.channelOption(option, value), eventPublisher); }
TcpClientImpl extends TcpClient<W, R> { @Override public <T> TcpClient<W, R> channelOption(ChannelOption<T> option, T value) { return copy(state.channelOption(option, value), eventPublisher); } }
TcpClientImpl extends TcpClient<W, R> { @Override public <T> TcpClient<W, R> channelOption(ChannelOption<T> option, T value) { return copy(state.channelOption(option, value), eventPublisher); } private  TcpClientImpl(ClientState<W, R> state, TcpClientEventPublisher eventPublisher,
                          InterceptingTcpClient<W, R> interceptingTcpClient); }
TcpClientImpl extends TcpClient<W, R> { @Override public <T> TcpClient<W, R> channelOption(ChannelOption<T> option, T value) { return copy(state.channelOption(option, value), eventPublisher); } private  TcpClientImpl(ClientState<W, R> state, TcpClientEventPublisher eventPublisher,
                          InterceptingTcpClient<W, R> interceptingTcpClient); @Override ConnectionRequest<W, R> createConnectionRequest(); @Override TcpClient<W, R> channelOption(ChannelOption<T> option, T value); @Override TcpClient<W, R> readTimeOut(final int timeOut, final TimeUnit timeUnit); @Override TcpClient<WW, RR> addChannelHandlerFirst(String name, Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerFirst(EventExecutorGroup group, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerLast(String name, Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerLast(EventExecutorGroup group, String name,
                                                            Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerBefore(String baseName, String name,
                                                              Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerBefore(EventExecutorGroup group, String baseName, String name,
                                                              Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerAfter(String baseName, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerAfter(EventExecutorGroup group, String baseName, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> pipelineConfigurator(Action1<ChannelPipeline> pipelineConfigurator); @Override @Deprecated TcpClient<W, R> enableWireLogging(LogLevel wireLoggingLevel); @Override TcpClient<W, R> enableWireLogging(String name, LogLevel wireLoggingLevel); @Override TcpClient<W, R> secure(Func1<ByteBufAllocator, SSLEngine> sslEngineFactory); @Override TcpClient<W, R> secure(SSLEngine sslEngine); @Override TcpClient<W, R> secure(SslCodec sslCodec); @Override TcpClient<W, R> unsafeSecure(); @Override TcpClient<W, R> channelProvider(ChannelProviderFactory providerFactory); @Override Subscription subscribe(TcpClientEventListener listener); @Override TcpClientInterceptorChain<W, R> intercept(); static TcpClientImpl<W, R> create(SocketAddress socketAddress); static TcpClientImpl<W, R> create(SocketAddress socketAddress, EventLoopGroup eventLoopGroup,
                                                    Class<? extends Channel> channelClass); static TcpClientImpl<W, R> create(ConnectionProviderFactory<W, R> factory,
                                                    Observable<Host> hostStream); }
TcpClientImpl extends TcpClient<W, R> { @Override public <T> TcpClient<W, R> channelOption(ChannelOption<T> option, T value) { return copy(state.channelOption(option, value), eventPublisher); } private  TcpClientImpl(ClientState<W, R> state, TcpClientEventPublisher eventPublisher,
                          InterceptingTcpClient<W, R> interceptingTcpClient); @Override ConnectionRequest<W, R> createConnectionRequest(); @Override TcpClient<W, R> channelOption(ChannelOption<T> option, T value); @Override TcpClient<W, R> readTimeOut(final int timeOut, final TimeUnit timeUnit); @Override TcpClient<WW, RR> addChannelHandlerFirst(String name, Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerFirst(EventExecutorGroup group, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerLast(String name, Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerLast(EventExecutorGroup group, String name,
                                                            Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerBefore(String baseName, String name,
                                                              Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerBefore(EventExecutorGroup group, String baseName, String name,
                                                              Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerAfter(String baseName, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> addChannelHandlerAfter(EventExecutorGroup group, String baseName, String name,
                                                             Func0<ChannelHandler> handlerFactory); @Override TcpClient<WW, RR> pipelineConfigurator(Action1<ChannelPipeline> pipelineConfigurator); @Override @Deprecated TcpClient<W, R> enableWireLogging(LogLevel wireLoggingLevel); @Override TcpClient<W, R> enableWireLogging(String name, LogLevel wireLoggingLevel); @Override TcpClient<W, R> secure(Func1<ByteBufAllocator, SSLEngine> sslEngineFactory); @Override TcpClient<W, R> secure(SSLEngine sslEngine); @Override TcpClient<W, R> secure(SslCodec sslCodec); @Override TcpClient<W, R> unsafeSecure(); @Override TcpClient<W, R> channelProvider(ChannelProviderFactory providerFactory); @Override Subscription subscribe(TcpClientEventListener listener); @Override TcpClientInterceptorChain<W, R> intercept(); static TcpClientImpl<W, R> create(SocketAddress socketAddress); static TcpClientImpl<W, R> create(SocketAddress socketAddress, EventLoopGroup eventLoopGroup,
                                                    Class<? extends Channel> channelClass); static TcpClientImpl<W, R> create(ConnectionProviderFactory<W, R> factory,
                                                    Observable<Host> hostStream);  }