Package org.jclouds.rest

Examples of org.jclouds.rest.RestContextFactory


      Properties properties = new Properties();
      properties.setProperty("simpledb.identity", accesskeyid);
      properties.setProperty("simpledb.credential", secretkey);

     
      RestContext<SimpleDBClient, SimpleDBAsyncClient> context = new RestContextFactory().createContext("simpledb", "AKIAJODKICBEKG7MM4XA", "FfqiNSiC88B6tJPDIOKUWUJGY68BQaQpkNz6Fsgq", new Properties());
      AttributePair p = new AttributePair("AccessNumber", "1213123", true);
      Multimap<String,AttributePair> m =LinkedHashMultimap.create();
      m.put("AccessNumber", p);
      Item attributes = new Item(m);
     
View Full Code Here


      };
   }

   @Override
   public RestContextSpec<IBMSmartCloudClient, IBMSmartCloudAsyncClient> createContextSpec() {
      return new RestContextFactory().createContextSpec("ibm-smartcloud", "identity", "credential", new Properties());
   }
View Full Code Here

   @BeforeGroups(groups = "live")
   public void setupClient() throws FileNotFoundException, IOException {
      setupCredentials();
      Properties overrides = setupProperties();
      context = new RestContextFactory().createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule(),
               new SshjSshClientModule()), overrides);

      connection = context.getApi();
      keyPair = ComputeTestUtils.setupKeyPair();
   }
View Full Code Here

      };
   }

   @Override
   public RestContextSpec<?, ?> createContextSpec() {
      return new RestContextFactory().createContextSpec("azurequeue", "identity", "credential", new Properties());
   }
View Full Code Here

   @BeforeGroups(groups = { "live" })
   public void setupClient() {
      setupCredentials();
      Properties overrides = setupProperties();

      connection = (AzureQueueClient) new RestContextFactory().createContext(provider,
               ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getApi();
   }
View Full Code Here

      Properties restProperties = new Properties();
      restProperties.setProperty("boxdotnet.contextbuilder", "org.jclouds.boxdotnet.BoxDotNetContextBuilder");
      restProperties.setProperty("boxdotnet.propertiesbuilder", "org.jclouds.boxdotnet.BoxDotNetPropertiesBuilder");

      context = new RestContextFactory(restProperties).createContext("boxdotnet", identity, credential,
            ImmutableSet.<Module> of(new Log4JLoggingModule()));

      connection = context.getApi();
   }
View Full Code Here

      //TODO take this out, when the service is registered in jclouds-core/rest.properties
      Properties restProperties = new Properties();
      restProperties.setProperty("twitter.contextbuilder", "org.jclouds.twitter.TwitterContextBuilder");
      restProperties.setProperty("twitter.propertiesbuilder", "org.jclouds.twitter.TwitterPropertiesBuilder");

      context = new RestContextFactory(restProperties).createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule()),
            overrides);

      client = context.getApi();
   }
View Full Code Here

      restProperties.setProperty("twitter.contextbuilder", "org.jclouds.twitter.TwitterContextBuilder");
      restProperties.setProperty("twitter.propertiesbuilder", "org.jclouds.twitter.TwitterPropertiesBuilder");

      Properties props = new Properties();
      props.setProperty("twitter.endpoint", "http://api.twitter.com");
      return new RestContextFactory(restProperties).createContextSpec("twitter", "foo", "bar", props);
   }
View Full Code Here

      int messageCount = Integer.parseInt(args[3]);

      Set<Module> modules = isEnterprise ? ImmutableSet.<Module> of(new NullLoggingModule(),
               new EnterpriseConfigurationModule()) : ImmutableSet.<Module> of(new NullLoggingModule());

      RestContext<SQSClient, SQSAsyncClient> context = new RestContextFactory().createContext("sqs", accesskeyid,
               secretkey, modules);

      try {
         Set<Queue> queues = Sets.newHashSet();
         if (purgeQueues(queueName, context)) {
View Full Code Here

      }
   }

   @Override
   public RestContextSpec<?, ?> createContextSpec() {
      return new RestContextFactory().createContextSpec(provider, "foo", "bar", getProperties());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.rest.RestContextFactory

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.