Package io.netty.bootstrap

Examples of io.netty.bootstrap.Bootstrap


* @author Nitesh Kant
*/
public class UdpClientBuilder<I, O> extends AbstractClientBuilder<I,O, UdpClientBuilder<I, O>, RxClient<I, O>> {

    public UdpClientBuilder(String host, int port) {
        this(host, port, new Bootstrap());
    }
View Full Code Here


        CompositeHttpClient<I, O>> {

    private static final RxClient.ServerInfo defaultServer = new RxClient.ServerInfo();

    public CompositeHttpClientBuilder() {
        this(new Bootstrap());
    }
View Full Code Here

*/
public class UdpServerBuilder<I, O> extends AbstractServerBuilder<I, O, Bootstrap, Channel, UdpServerBuilder<I, O>,
        UdpServer<I, O>> {

    public UdpServerBuilder(int port, ConnectionHandler<I, O> connectionHandler) {
        this(port, connectionHandler, new Bootstrap());
    }
View Full Code Here

* @author Nitesh Kant
*/
public class ClientBuilder<I, O> extends AbstractClientBuilder<I,O, ClientBuilder<I, O>, RxClient<I, O>> {

    public ClientBuilder(String host, int port) {
        this(host, port, new Bootstrap());
    }
View Full Code Here

     * @param port    Server port.
     */
    public RedisClient(EventLoopGroup group, String host, int port, int timeout) {
        addr = new InetSocketAddress(host, port);

        bootstrap = new Bootstrap().channel(NioSocketChannel.class).group(group).remoteAddress(addr);

        setDefaultTimeout(timeout, TimeUnit.MILLISECONDS);

        channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
    }
View Full Code Here

    private boolean allowExtensions;
    private int maxFramePayloadLength = 65536;


    public WebSocketClientBuilder(String host, int port) {
        this(host, port, new Bootstrap());
    }
View Full Code Here

    try {

      ProtocolShared.Ref sharedRef = ProtocolShared.acquire();

      Bootstrap clientBootstrap = sharedRef.get().getBootstrap();

      ChannelFuture connectFuture = clientBootstrap.connect(address).syncUninterruptibly();

      Channel channel = connectFuture.channel();
      ProtocolImpl protocol = ProtocolImpl.newInstance(sharedRef, channel, context);

      if (sslMode != SSLMode.Disable && sslMode != SSLMode.Allow) {
View Full Code Here

  private void init() {
    int workerCount = getRuntime().availableProcessors();
    NioEventLoopGroup group = new NioEventLoopGroup(workerCount, new NamedThreadFactory("PG-JDBC EventLoop"));

    bootstrap = new Bootstrap();
    bootstrap.group(group).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {
      @Override
      protected void initChannel(SocketChannel ch) throws Exception {
        ch.pipeline().addLast(new MessageDecoder(), new MessageHandler());
      }
View Full Code Here

  public String receiveMessage() {
    return channelInitializer.getClientHandler().getMessage();
  }
   
    private void doOpen() throws Throwable {
      bootstrap = new Bootstrap();
     
      bootstrap.option(ChannelOption.SO_KEEPALIVE, true);
      bootstrap.option(ChannelOption.TCP_NODELAY, true);

      bootstrap.group(group)
View Full Code Here

    this.connectTimeout = connectTimeout;
  }

  public void init() {
    group = new OioEventLoopGroup();
    bootstrap = new Bootstrap();
    bootstrap.group(group)
      .channel(OioSocketChannel.class)
      .option(ChannelOption.SO_KEEPALIVE, true)
      .option(ChannelOption.TCP_NODELAY, true)
      .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeout)
View Full Code Here

TOP

Related Classes of io.netty.bootstrap.Bootstrap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.