Package com.google.dataconnector.client

Examples of com.google.dataconnector.client.StrategyException


        replyBuilder.setContents(ByteString.copyFrom(contents.toByteArray()));
      }
      replyBuilder.setStatus(0);
     
    } catch (MalformedURLException e) {
      throw new StrategyException(request.getId() + ": bad url.", e);
    } catch (IOException e) {
      throw new StrategyException(request.getId() + ": io exception.", e);
    }
  }
View Full Code Here


      httpMethod = getMethod(request);
      if (httpMethod != null) {
        copyHeaders(request, httpMethod);
        return httpClient.execute(httpMethod);
      } else {
        throw new StrategyException(request.getId() + ": Unknown method.");
      }
    } catch (IOException e) {
      String method = (httpMethod != null) ? httpMethod.getMethod() : "Unknown";
      throw new StrategyException(request.getId() + ": while executing HTTP " +
                                  method + ": ", e);
    }
  }
View Full Code Here

        buff.close();
        if (buff.size() > 0) {
          replyBuilder.setContents(ByteString.copyFrom(buff.toByteArray()));
        }
      } catch (IOException e) {
        throw new StrategyException(request.getId() + " while copying content:", e);
      }
    }
    // Copy the headers
    for (Header h : response.getAllHeaders()) {
      replyBuilder.addHeaders(MessageHeader.newBuilder()
View Full Code Here

TOP

Related Classes of com.google.dataconnector.client.StrategyException

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.