Package org.snova.http.client

Examples of org.snova.http.client.HttpClient


    request.setHeader(HttpHeaders.Names.CONTENT_TYPE,
        "application/octet-stream");
    request.setHeader(HttpHeaders.Names.CONTENT_LENGTH, buf.readableBytes());
    request.setContent(ChannelBuffers.wrappedBuffer(buf.getRawBuffer(),
        buf.getReadIndex(), buf.readableBytes()));
    HttpClient client = HttpTunnelService.httpClient;
    try {
      client.execute(request, new HttpClientFutureCallback(buf));
    } catch (HttpClientException e) {
      logger.error("Push worker got unexpected exception:",e);
      isReady = true;
    }
  }
View Full Code Here


  {
    if (null != directHttpClient)
    {
      return;
    }
    directHttpClient = new HttpClient(null,
            SharedObjectHelper.getClientBootstrap());
  }
View Full Code Here

          return SharedObjectHelper.getClientBootstrap().connect(
                  new InetSocketAddress(remoteHost, port));
        }
      };
    }
    httpClient = new HttpClient(options,
            SharedObjectHelper.getClientBootstrap());
  }
View Full Code Here

            cfg.getProperty("C4", "UserAgent",
                    "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"));
    request.setHeader(HttpHeaders.Names.CONTENT_TYPE,
            "application/octet-stream");
    request.setHeader(HttpHeaders.Names.CONTENT_LENGTH, "0");
    HttpClient client = HttpTunnelService.httpClient;
    try
    {
      client.execute(request, this);
    }
    catch (HttpClientException e)
    {
      logger.error("Pullworker Http client error.", e);
    }
View Full Code Here

          return future;
        }
      };
      httpOptions.proxyCB = httpsOptions.proxyCB;
    }
    httpsClient = new HttpClient(httpsOptions,
            SharedObjectHelper.getClientBootstrap());
    httpClient = new HttpClient(httpOptions,
            SharedObjectHelper.getClientBootstrap());
  }
View Full Code Here

      {
        req.setUri("http://" + HttpHeaders.getHost(req) + req.getUri());
      }
      try
      {
        HttpClient c = httpsClient;
        if (!useHttps)
        {
          c = httpClient;
        }
       
        proxyClientHandler = c.execute(req,
                new FutureCallback.FutureCallbackAdapter()
                {
                  @Override
                  public void onResponse(HttpResponse res)
                  {
View Full Code Here

          }
          return future;
        }
      };
    }
    client = new HttpClient(options,
            SharedObjectHelper.getClientBootstrap());
  }
View Full Code Here

TOP

Related Classes of org.snova.http.client.HttpClient

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.