Examples of readResponse()


Examples of com.subgraph.orchid.directory.downloader.HttpConnection.readResponse()

    Stream stream = null;
    try {
      stream = openHSDirectoryStream(dd.getDirectory());
      HttpConnection http = new HttpConnection(stream);
      http.sendGetRequest("/tor/rendezvous2/"+ dd.getDescriptorId().toBase32());
      http.readResponse();
      if(http.getStatusCode() == 200) {
        return readDocument(dd, http.getMessageBody());
      } else {
        logger.fine("HS descriptor download for "+ hiddenService.getOnionAddressForLogging() + " failed with status "+ http.getStatusCode());
      }
View Full Code Here

Examples of com.sun.xml.ws.client.sei.StubHandler.readResponse()

    }

    public JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call) {
        StubHandler stubHandler = stubHandlers.get(call.getMethod());
        try {
            return stubHandler.readResponse(res, call);
        } catch (Throwable e) {
            call.setException(e);
            return call;
        }
    }
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

      anHTTPConnection.setReceiveTimeout(5000);

      requestSucceeded = anHTTPConnection.sendRequest(aRequest);

      if (requestSucceeded) {
        aResponse = anHTTPConnection.readResponse();
      }

      if ((aResponse == null) || (!requestSucceeded) || (aResponse.status() != 200)) {
        throw new MonitorException("Error requesting directory listing for " + aString + " from " + aHost.name());
      }
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(currentHost.name(), theApplication
                    .lifebeatDestinationPort());
            anHTTPConnection.setReceiveTimeout(10000);

            if (anHTTPConnection.sendRequest(aRequest)) {
                aResponse = anHTTPConnection.readResponse();
            }
        } catch (Throwable localException) {
            NSLog._conditionallyLogPrivateException(localException);
        }
        if (aResponse == null) {
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

            anHTTPConnection.setReceiveTimeout(_receiveTimeout);

            boolean requestSucceeded = anHTTPConnection.sendRequest(aRequest);

            if (requestSucceeded) {
                aResponse = anHTTPConnection.readResponse();
            } else {
                throw new MonitorException(_hostName + ": Failed to receive response from " + anInstance.displayName());
            }
            anInstance.succeededInConnection();
        } catch (NSForwardException ne) {
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

            boolean requestSucceeded = anHTTPConnection.sendRequest(aRequest);

            isAvailable = true;

            if (requestSucceeded) {
                aResponse = anHTTPConnection.readResponse();
            } else {
                isAvailable = false;
            }

            if (aResponse == null) {
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

        try {
            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(configHostName, aPort);
            anHTTPConnection.setReceiveTimeout(5000);

            if (anHTTPConnection.sendRequest(aRequest)) {
                aResponse = anHTTPConnection.readResponse();
            }
        } catch(Exception localException) {
            log.error("Failed to connect to Host: " + configHostName + " and Port: " + aPort);
            throw new MonitorException("Failed to connect to Host: " + configHostName + " and Port: " + aPort);
        }
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

        paypalEchoRequest.setContent(returnString);
        ppEchoConnection.setReceiveTimeout(90 * 1000); // 90 second timeout -- this might be too long!?!
        connectionSuccess = ppEchoConnection.sendRequest(paypalEchoRequest);
        if (connectionSuccess) {
          ppValidationResponse = ppEchoConnection.readResponse(); // read PayPal's validation
        }

        ppValidationResponseString = ppValidationResponse.contentString();

        if (connectionSuccess) {
View Full Code Here

Examples of com.webobjects.appserver.WOHTTPConnection.readResponse()

       * separated by commas. The first number is the status code, the
       * second is the accuracy, the third is the latitude, while the
       * fourth one is the longitude.
       */

      String responseText = connection.readResponse().contentString();
      result = new NSDictionary(responseText.split(","), GEOCODER_RESPONSE_KEYS);
    }
    return result;
  }

View Full Code Here

Examples of org.eclipse.jetty.toolchain.test.http.SimpleHttpParser.readResponse()

            output.write(request.getBytes(StandardCharsets.UTF_8));
            output.flush();

            BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8));
            SimpleHttpParser parser = new SimpleHttpParser();
            SimpleHttpResponse response = parser.readResponse(reader);
            Assert.assertEquals("200", response.getCode());
            Assert.assertEquals(1, completes.get());

            // Send a second request
            completes.set(0);
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.