Package org.platformlayer

Examples of org.platformlayer.HttpPlatformLayerClient


  static final Cache<String, HttpPlatformLayerClient> platformLayerClientCache = CacheBuilder.newBuilder()
      .expireAfterAccess(300, TimeUnit.SECONDS).maximumSize(10).build();

  public PlatformLayerClient buildPlatformLayerClient() throws IOException, OpsException {
    HttpPlatformLayerClient client;
    if (configFile == null) {
      throw new IllegalArgumentException("Config file is required");
    }

    InputStream is = null;
View Full Code Here


  }

  private HttpPlatformLayerClient buildPlatformLayerClient(Properties properties, boolean debug) {
    HttpStrategy httpStrategy = new JreHttpStrategy();
    // HttpStrategy httpStrategy = new ApacheCommonsHttpStrategy();
    HttpPlatformLayerClient client = HttpPlatformLayerClient.buildUsingProperties(httpStrategy, properties);

    if (debug) {
      client.setDebug(System.err);
    } else {
      // We don't want debug messages to interfere with our output
      // TODO: Fix this so debug output doesn't interfere (stderr?)
      // TODO: Maybe output the debug info only in case of failure?
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      client.setDebug(new PrintStream(baos));
    }

    return client;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.HttpPlatformLayerClient

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.