Package eu.mosaic_cloud.platform.core.configuration

Examples of eu.mosaic_cloud.platform.core.configuration.IConfiguration


    @Override
    public CallbackCompletion<Void> initialize (final ConsumerStringContext context, final CloudletCallbackArguments<ConsumerStringContext> arguments)
    {
      this.logger.info ("ConsumerString initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuestring.consumer"));
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, String.class, PlainTextDataEncoder.create(), new AmqpConsumerCallback (), context);
      return CallbackCompletion.createAndChained (context.consumer.initialize ());
    }
View Full Code Here


    @Override
    public CallbackCompletion<Void> initialize (final ConverterXmlTreeContext context, final CloudletCallbackArguments<ConverterXmlTreeContext> arguments)
    {
      this.logger.info ("ConverterXmlTree initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuexml.consumer"));
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuetree.publisher"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, Tree.class, SerializedDataEncoder.create(Tree.class), new AmqpPublisherCallback (), context);
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, String.class, SerializedDataEncoder.create(String.class), new AmqpConsumerCallback (), context);
      return CallbackCompletion.createAndChained (context.consumer.initialize (),context.publisher.initialize ());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ConverterTreeXmlKVContext context, final CloudletCallbackArguments<ConverterTreeXmlKVContext> arguments)
    {
      this.logger.info ("ConverterTreeXmlKV initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuetree.consumer"));
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuexml.publisher"));
      final IConfiguration kvConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("storetree"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, String.class, SerializedDataEncoder.create(String.class), new AmqpPublisherCallback (), context);
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, Tree.class, SerializedDataEncoder.create(Tree.class) , new AmqpConsumerCallback (), context);
      context.kvStore = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfiguration, Tree.class,SerializedDataEncoder.create(Tree.class), new KeyValueCallback (), context);
      return CallbackCompletion.createAndChained (context.consumer.initialize (),context.publisher.initialize (),context.kvStore.initialize());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final PushQPTContext context, final CloudletCallbackArguments<PushQPTContext> arguments)
    {
      this.logger.info ("PushQPT initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueqpt.publisher"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, QPT.class, JsonDataEncoder.create(QPT.class), new AmqpPublisherCallback (), context);
      return CallbackCompletion.createAndChained (context.publisher.initialize ());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ConsumerQPTKVStringKVContext context, final CloudletCallbackArguments<ConsumerQPTKVStringKVContext> arguments)
    {
      this.logger.info ("ConsumerQPTKV initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueqpt.consumer"));
      final IConfiguration kvConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("storeqpt"));
      final IConfiguration kvConfigurationString = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("storestring"));
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, QPT.class, JsonDataEncoder.create(QPT.class), new AmqpConsumerCallback (), context);
      context.kvStore = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfiguration, QPT.class, JsonDataEncoder.create(QPT.class), new KeyValueCallback (), context);
      context.kvStoreString = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfigurationString, String.class, PlainTextDataEncoder.create(), new KeyValueCallbackString (), context);
     
      return CallbackCompletion.createAndChained (context.consumer.initialize (),context.kvStore.initialize(),context.kvStoreString.initialize());
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final PushStringContext context, final CloudletCallbackArguments<PushStringContext> arguments)
    {
      this.logger.info ("PushString initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuestring.publisher"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, String.class, PlainTextDataEncoder.create(), new AmqpPublisherCallback (), context);
      return CallbackCompletion.createAndChained (context.publisher.initialize ());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ConsumerKeyByteContext context, final CloudletCallbackArguments<ConsumerKeyByteContext> arguments)
    {
      this.logger.info ("ConsumerKeyByte initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration kvConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("resultstore"));
      context.kvStore = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfiguration, byte[].class, NullDataEncoder.create (), new KeyValueCallback (), context);
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueresult.consumer"));
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new AmqpConsumerCallback (), context);
      return CallbackCompletion.createAndChained (context.kvStore.initialize (), context.consumer.initialize ());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ConsumerByteContext context, final CloudletCallbackArguments<ConsumerByteContext> arguments)
    {
      this.logger.info ("ConsumerByte initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuemhttpgw.consumer"));
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueclient.publisher"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new AmqpPublisherCallback (), context);
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, byte[].class, NullDataEncoder.create(), new AmqpConsumerCallback (), context);
      return CallbackCompletion.createAndChained (context.consumer.initialize (),context.publisher.initialize ());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ServletProvaContext context, final CloudletCallbackArguments<ServletProvaContext> arguments)
    {
      this.logger.info ("ServletProva initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queue_input.publisher"));
      context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, KeyMessage.class, JsonDataEncoder.create(KeyMessage.class), new AmqpPublisherCallback(), context);
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuemhttpgw.consumer"));
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, byte[].class, NullDataEncoder.create(), new AmqpConsumerCallback (), context);
      final IConfiguration kvConfigurationbyte = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("resultstorebyte"));
      context.kvStorebyte = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfigurationbyte, byte[].class, NullDataEncoder.DEFAULT_INSTANCE, new KeyValueCallbackbyte (), context);
     
      return CallbackCompletion.createAndChained (context.kvStorebyte.initialize(),context.publisher.initialize(),context.consumer.initialize());
    }
View Full Code Here

    @Override
    public CallbackCompletion<Void> initialize (final ConsumerCountcharactersContext context, final CloudletCallbackArguments<ConsumerCountcharactersContext> arguments)
    {
      this.logger.info ("ConsumerKeyByte initializing...");
      context.cloudlet = arguments.getCloudlet ();
      final IConfiguration configuration = context.cloudlet.getConfiguration ();
      final IConfiguration kvConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("resultstore"));
      context.kvStore = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfiguration, byte[].class, NullDataEncoder.create (), new KeyValueCallback (), context);
      final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueresult.consumer"));
      context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new AmqpConsumerCallback (), context);
      return CallbackCompletion.createAndChained (context.kvStore.initialize (), context.consumer.initialize ());
    }
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.platform.core.configuration.IConfiguration

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.