Package org.jclouds.domain

Examples of org.jclouds.domain.JsonBall


   public static class NullHackJsonBallAdapter extends NullHackJsonLiteralAdapter<JsonBall> {

      @Override
      protected JsonBall createJsonLiteralFromRawJson(String json) {
         return new JsonBall(json);
      }
View Full Code Here


       *             The size of the message allowed in one message is configurable by your cloud provider. Consult
       *             your cloud provider documentation to learn the valid range.
       */
      public Builder body(String json) {
         checkNotNull(json, "body required");
         this.body = new JsonBall(json).toString();
         return self();
      }
View Full Code Here

   public static class NullHackJsonBallAdapter extends NullHackJsonLiteralAdapter<JsonBall> {

      @Override
      protected JsonBall createJsonLiteralFromRawJson(String json) {
         return new JsonBall(json);
      }
View Full Code Here

      AsyncJob<?> expects = AsyncJob.builder()
         .id("860")
         .status(Status.IN_PROGRESS)
         .progress(0)
         .resultCode(ResultCode.SUCCESS)
         .result(ImmutableMap.of("foo", new JsonBall("{\"bar\":1}"), "foo2", new JsonBall("{\"bar2\":2}"))).build();

      ParseAsyncJobFromHttpResponse parser = i.getInstance(ParseAsyncJobFromHttpResponse.class);
      @SuppressWarnings("unchecked")
      AsyncJob<PublicIPAddress> response = (AsyncJob<PublicIPAddress>) parser.apply(HttpResponse.builder()
                                                                                                .statusCode(200).message("ok")
View Full Code Here

   public static class NullHackJsonBallAdapter extends NullHackJsonLiteralAdapter<JsonBall> {

      @Override
      protected JsonBall createJsonLiteralFromRawJson(String json) {
         return new JsonBall(json);
      }
View Full Code Here

  @Override
  public JsonBall get() {
    String path = servletContext.getContextPath();
    if (path == null || path.equals(""))
      path = "/";
    return new JsonBall(String.format("{\"%s\":%s}", path,
        provideJson(servletContext)));
  }
View Full Code Here

         super("os.name", systemProperties);
      }

      @Override
      public JsonBall get() {
         JsonBall returnValue = super.get();
         return returnValue != null ? new JsonBall(returnValue.toString().replaceAll("[ -]", "").toLowerCase()) : null;
      }
View Full Code Here

         this.systemProperties = systemProperties;
      }

      @Override
      public JsonBall get() {
         return systemProperties.containsKey(property) ? new JsonBall(systemProperties.getProperty(property)) : null;
      }
View Full Code Here

   @Test
   public void testBase() {
      assertEquals(
            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
                  Suppliers.ofInstance(new JsonBall("java"))))), "{\"java\":\"java\"}");
   }
View Full Code Here

   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testIllegal() {
      json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
            Suppliers.ofInstance(new JsonBall("java")), "java/system", Suppliers.ofInstance(new JsonBall("system")))));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.domain.JsonBall

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.