Package eu.mosaic_cloud.cloudlets.connectors.core

Examples of eu.mosaic_cloud.cloudlets.connectors.core.IConnectorsFactoryBuilder


    }.trigger ();
  }
 
  private final IConnectorsFactory provideConnectorsFactory ()
  {
    final IConnectorsFactoryBuilder builder = this.provideConnectorsFactoryBuilder ();
    final List<?> initializers = this.provideConnectorsFactoryInitializers ();
    for (final Object initializer : initializers) {
      if (initializer instanceof eu.mosaic_cloud.cloudlets.connectors.core.IConnectorsFactoryInitializer) {
        try {
          builder.initialize ((eu.mosaic_cloud.cloudlets.connectors.core.IConnectorsFactoryInitializer) initializer);
        } catch (final Throwable exception) {
          this.exceptions.traceHandledException (exception);
          throw (new IllegalArgumentException ("error encountered while initializing cloudlet connectors factory", exception));
        }
      } else if (initializer instanceof eu.mosaic_cloud.connectors.core.IConnectorsFactoryInitializer) {
        try {
          builder.initialize ((eu.mosaic_cloud.connectors.core.IConnectorsFactoryInitializer) initializer);
        } catch (final Throwable exception) {
          this.exceptions.traceHandledException (exception);
          throw (new IllegalArgumentException ("error encountered while initializing cloudlet connectors factory", exception));
        }
      } else {
        throw (new IllegalArgumentException (ExtendedFormatter.defaultInstance.format ("error encountered while initializing cloudlet connectors factory, unexpected initializer class `%{object:class}`", initializer)));
      }
    }
    final IConnectorsFactory factory;
    try {
      factory = builder.build ();
    } catch (final Throwable exception) {
      this.exceptions.traceHandledException (exception);
      throw (new IllegalArgumentException ("error encountered while building cloudlet connectors factory", exception));
    }
    return factory;
View Full Code Here


 
  private final IConnectorsFactoryBuilder provideConnectorsFactoryBuilder ()
  {
    final String className = ConfigUtils.resolveParameter (this.environment.getConfiguration (), ConfigProperties.getString ("Cloudlet.1"), String.class, DefaultConnectorsFactory.Builder.class.getName ());
    Preconditions.checkNotNull (className, "unknown cloudlet connectors factory builder class");
    final IConnectorsFactoryBuilder builder = this.provideConnectorsFactoryObject (IConnectorsFactoryBuilder.class, className, new Class<?>[] {ICloudletController.class, ConnectorEnvironment.class, eu.mosaic_cloud.connectors.core.IConnectorsFactory.class}, new Object[] {this.controllerProxy, this.environment.getConnectorEnvironment (), this.environment.getConnectors ()});
    return builder;
  }
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.cloudlets.connectors.core.IConnectorsFactoryBuilder

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.