Examples of HttpClient


Examples of com.hubspot.horizon.HttpClient

  @Override
  protected void configure() {
    ObjectMapper objectMapper = JavaUtils.newObjectMapper();

    HttpClient httpClient = new NingHttpClient(HttpConfig.newBuilder().setObjectMapper(objectMapper).build());
    bind(HttpClient.class).annotatedWith(Names.named(HTTP_CLIENT_NAME)).toInstance(httpClient);

    bind(SingularityClient.class).toProvider(SingularityClientProvider.class).in(Scopes.SINGLETON);

    if (hosts != null) {
View Full Code Here

Examples of com.maverick.http.HttpClient

  private synchronized HttpClient getHttpClient() {
    if (client == null) {
      // #ifdef DEBUG
      log.info("Creating HttpClient instance"); //$NON-NLS-1$
      // #endif
      client = new HttpClient(aditoHostname, aditoPort, isSecure);
      client.setAuthenticationPrompt(defaultAuthenticationPrompt != null ? defaultAuthenticationPrompt : getGUI());
      if (defaultProxyHost != null && !defaultProxyHost.equals("")) { //$NON-NLS-1$
        // #ifdef DEBUG
        log.info("Configuring proxies for HttpClient instance"); //$NON-NLS-1$
        // #endif
View Full Code Here

Examples of com.metamx.http.client.HttpClient

public class DirectDruidClientTest
{
  @Test
  public void testRun() throws Exception
  {
    HttpClient httpClient = EasyMock.createMock(HttpClient.class);
    RequestBuilder requestBuilder = new RequestBuilder(httpClient, HttpMethod.POST, new URL("http://foo.com"));
    EasyMock.expect(httpClient.post(EasyMock.<URL>anyObject())).andReturn(requestBuilder).atLeastOnce();

    SettableFuture futureException = SettableFuture.create();

    SettableFuture<InputStream> futureResult = SettableFuture.create();
    EasyMock.expect(httpClient.go(EasyMock.<Request>anyObject())).andReturn(futureResult).times(1);
    EasyMock.expect(httpClient.go(EasyMock.<Request>anyObject())).andReturn(futureException).times(1);
    EasyMock.expect(httpClient.go(EasyMock.<Request>anyObject())).andReturn(SettableFuture.create()).atLeastOnce();
    EasyMock.replay(httpClient);

    final ServerSelector serverSelector = new ServerSelector(
        new DataSegment(
            "test",
View Full Code Here

Examples of com.proofpoint.http.client.HttpClient

        httpServerInfo = new HttpServerInfo(config, nodeInfo);

        createServer();
        server.start();

        HttpClient client = new JettyHttpClient();
        StatusResponse response = client.execute(prepareGet().setUri(httpServerInfo.getHttpsUri()).build(), createStatusResponseHandler());

        assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK);
    }
View Full Code Here

Examples of com.restartle.client.HttpClient

   
    tuple.cores /= 2.75; // Convert Amazon ECUs to "true" cores (approximately)
  }
 
  private JsonObject fetchAndParse(String url) {
    String rawData = new HttpClient()
        .setUrl(url)
        .setTimeoutMs(20 * 1000)
        .executeGet();
    JsonObject rawJson = JsonUtil.parseJson(rawData);
    return rawJson;
View Full Code Here

Examples of com.scooterframework.common.http.HTTPClient

    if (httpclient != null) httpclient.shutDown();
  }

  public void refreshHttpConnection() {
    if (httpclient != null) httpclient.shutDown();
    httpclient = new HTTPClient();
  }
View Full Code Here

Examples of com.simoncat.net.HttpClient

    //recuperar los datos del server
     //Server server = new Server();

    //verificar si la aplicasion esta corriendo?
    ////http://localhost:8080/manager/list
    HttpClient hc1 = new HttpClient("localhost",8080,"tomcat","admin","");
    boolean lb = hc1.appIsRunning("Binary");
    boolean ub=false;
    boolean db=false;
    if(lb){
      // autenticar y undeploy la aplicacion en el tomcat.
      ////http://localhost:8080/manager/undeploy?path=/Binary
      String undeploy = "http://localhost:8080/manager/undeploy?path=/Binary";
           HttpClient hc2 = new HttpClient("localhost",8080,"tomcat","admin",undeploy);
       ub=hc2.execute();
    }
        //Copy WAR
    //confirmar upload 
   
    if((lb && ub) || (!lb) ){
          //Deploy WAR       
        //enviar comando al tomcat 
      ////http://localhost:8080/manager/deploy?path=/Binary&war=file:/tmp/Binary.war 
       String deploy = "http://localhost:8080/manager/deploy?path=/Binary&war=file:/tmp/Binary.war";
           HttpClient hc3 = new HttpClient("localhost",8080,"tomcat","admin",deploy);
       db=hc3.execute();
    }

    fso = new FinalScreenOutput();
          fso.setPageTitle    ("Upload-Deploy War[Finished]");
View Full Code Here

Examples of com.sonian.elasticsearch.http.jetty.HttpClient

    }

    @Test
    public void testSuccess() throws Exception {
        publishAuth("server1", "foo", "MD5:37b51d194a7513e45b56f6524f2d51f2", "pray:readwrite:love"); // password bar
        HttpClient http = httpClient("server1", "foo", "bar");
        String data;
        data = jsonBuilder().startObject().field("blip", 1).endObject().string();
        HttpClientResponse resp = http.request("PUT", "/foo/bar/1", data.getBytes());
        assertThat(resp.errorCode(), equalTo(201));
    }
View Full Code Here

Examples of com.uip.tatar.network.HttpClient

    //private final Logger LOGGER = Logger.makeLogger(LOG_TAG);

    public APITatarDefaultClient(Configuration configuration) {
        setConfig(configuration);
        setErrorHandler(new DefaultErrorHandler());
        mHttpClient = new HttpClient();
    }
View Full Code Here

Examples of com.volantis.mcs.utilities.HttpClient

            requestHeaders.add(hostHeader);
            if( characterEncoding != null ) {
                requestHeaders.add( "Accept-Charset: " + characterEncoding );
            }

            HttpClient client = new HttpClient( messageURL, requestHeaders );

            HttpResponseHeader responseHeaders = client.getResponseHeaders();

            if( responseHeaders.getErrorCode() == 200 ) {

                // read in message from URL
                InputStreamReader isr =
                        (InputStreamReader)client.getInputStreamReader();
                String encoding = isr.getEncoding();

                StringBuffer bodyContent = new StringBuffer();

                char[] line = new char[1024];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.