Package org.jclouds

Examples of org.jclouds.View


         @Override
         public <I> void hear(final TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) {
            typeEncounter.register(new InjectionListener<I>() {
               @Override
               public void afterInjection(Object object) {
                  final View view = (View) object;
                  final Iterable<ViewMBean> viewMamanagementBeans  = viewManagementOf(view);
                  final Closer closer = view.unwrap().utils().injector().getInstance(Closer.class);
                  //We get the name from the view and not from the view management object to avoid proxy issues.
                  final String name = view.unwrap().getName();
                  managementContext.register(view);

                  //Manage the created management view objects to the context.
                  for (ViewMBean viewMBean : viewMamanagementBeans) {
                     managementContext.manage(viewMBean, name);
View Full Code Here


* @author Andrew Bayer
*/
@Test(groups = "unit", testName = "EC2ContextBuilderTest")
public class EC2ContextBuilderText {
   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new EC2ApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "CloudStackContextBuilderTest")
public class CloudStackContextBuilderTest {

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new CloudStackApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(CloudStackApi.class);
   }
View Full Code Here

         @Override
         public <I> void hear(final TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) {
            typeEncounter.register(new InjectionListener<I>() {
               @Override
               public void afterInjection(Object object) {
                  final View view = (View) object;
                  final Iterable<ViewMBean> viewMamanagementBeans  = viewManagementOf(view);
                  final Closer closer = view.unwrap().utils().injector().getInstance(Closer.class);
                  //We get the name from the view and not from the view management object to avoid proxy issues.
                  final String name = view.unwrap().getName();
                  managementContext.register(view);

                  //Manage the created management view objects to the context.
                  for (ViewMBean viewMBean : viewMamanagementBeans) {
                     managementContext.manage(viewMBean, name);
View Full Code Here

               .buildInjector().getInstance(Key.get(new TypeLiteral<Map<String, String>>() {
               }, ImageQuery.class));
   }

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new AWSEC2ProviderMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
      view.unwrapApi(AWSEC2Api.class);
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "NovaEC2ContextBuilderTest")
public class NovaEC2ContextBuilderTest {

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new NovaEC2ApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
      view.unwrapApi(NovaEC2Api.class);
   }
View Full Code Here

@Test(groups = "unit", testName = "CloudStackContextBuilderTest")
public class CloudStackContextBuilderTest {

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new CloudStackApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(CloudStackApi.class);
   }
View Full Code Here

@Test(groups = "unit", testName = "NovaEC2ContextBuilderTest")
public class NovaEC2ContextBuilderTest {

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new NovaEC2ApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
      view.unwrapApi(NovaEC2Api.class);
   }
View Full Code Here

               .buildInjector().getInstance(Key.get(new TypeLiteral<Map<String, String>>() {
               }, ImageQuery.class));
   }

   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new AWSEC2ProviderMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
      view.unwrapApi(AWSEC2Api.class);
   }
View Full Code Here

import org.testng.annotations.Test;

@Test(groups = "unit", testName = "EC2ContextBuilderTest")
public class EC2ContextBuilderText {
   public void testAssignability() {
      View view = ContextBuilder.newBuilder(new EC2ApiMetadata()).credentials("foo", "bar")
              .buildView(typeToken(ComputeServiceContext.class));
      view.unwrapApi(EC2Api.class);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.View

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.