context.cloudlet = arguments.getCloudlet ();
final IConfiguration configuration = context.cloudlet.getConfiguration ();
final IConfiguration configuration2 = context.cloudlet.getConfiguration ();
final IConfiguration configuration3 = context.cloudlet.getConfiguration ();
final IConfiguration configuration4 = context.cloudlet.getConfiguration ();
final IConfiguration configuration5 = context.cloudlet.getConfiguration ();
final IConfiguration configuration6 = context.cloudlet.getConfiguration ();
final IConfiguration queueConfiguration = configuration
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queuestate"));
context.consumer = context.cloudlet.getConnectorFactory
(IAmqpQueueConsumerConnectorFactory.class).create
(queueConfiguration, String.class, JsonDataEncoder.create
(String.class), new AmqpConsumerCallbackState (), context);
/*state.consumer = new AmqpQueueConsumer<TradeStateInt.TradeStateIntState,String>(
queueConfiguration, cloudlet, String.class, encoder);*/
final IConfiguration queueConfigurationb = configuration2
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queueevaluate"));
context.publisher = context.cloudlet.getConnectorFactory
(IAmqpQueuePublisherConnectorFactory.class).create
(queueConfigurationb, String.class, JsonDataEncoder.create
(String.class), new AmqpPublisherCallbackEvaluate (), context);
/*state.publisher = new AmqpQueuePublisher<TradeStateInt.TradeStateIntState,String>(
queueConfigurationb, cloudlet, String.class, encoder);*/
final IConfiguration queueConfiguration3 = configuration3
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queueinter"));
context.consumerslagw = context.cloudlet.getConnectorFactory
(IAmqpQueueConsumerConnectorFactory.class).create
(queueConfiguration3, byte[].class, NullDataEncoder.create(),
new AmqpConsumerCallbackSLAgw (), context);
/*state.consumerslagw = new AmqpQueueConsumer<TradeStateInt.TradeStateIntState,byte[]>(
queueConfiguration3, cloudlet, null, nonencoder);*/
final IConfiguration queueConfiguration4 = configuration4
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queueresponce"));
context.consumerresponce = context.cloudlet.getConnectorFactory
(IAmqpQueueConsumerConnectorFactory.class).create
(queueConfiguration4,String.class, JsonDataEncoder.create
(String.class), new AmqpConsumerCallbackResponce (), context);
/*state.consumerresponce = new AmqpQueueConsumer<TradeStateInt.TradeStateIntState,String>(
queueConfiguration4, cloudlet, String.class, encoder);*/
final IConfiguration queueConfigurationb5 = configuration5
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queueslastore"));
context.publisherslastore = context.cloudlet.getConnectorFactory
(IAmqpQueuePublisherConnectorFactory.class).create
(queueConfigurationb5, String.class, JsonDataEncoder.create
(String.class), new AmqpPublisherCallbackSlaStore (), context);
/*state.publisherslastore = new AmqpQueuePublisher<TradeStateInt.TradeStateIntState,String>(
queueConfigurationb5, cloudlet, String.class, encoder);*/
final IConfiguration queueConfigurationb6 = configuration6
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("queuecagw"));
context.publishercagw = context.cloudlet.getConnectorFactory
(IAmqpQueuePublisherConnectorFactory.class).create
(queueConfigurationb6, String.class, JsonDataEncoder.create
(String.class), new AmqpPublisherCallbackCAgw(), context);
/*state.publishercagw = new AmqpQueuePublisher<TradeStateInt.TradeStateIntState,String>(
queueConfigurationb6, cloudlet, String.class, encoder);*/
final IConfiguration kvConfiguration = configuration
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("statestore"));
context.kvStore = context.cloudlet.getConnectorFactory
(IKvStoreConnectorFactory.class).create
(kvConfiguration, String.class, JsonDataEncoder.create
(String.class), new KeyValueCallbackstatostore (), context);
/*state.kvStore = new KeyValueAccessor<TradeStateIntState>(
kvConfiguration, cloudlet, new JsonDataEncoder<String>(
String.class));*/
final IConfiguration kvConfiguration2 = configuration
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("slastore"));
context.kvStoresla = context.cloudlet.getConnectorFactory
(IKvStoreConnectorFactory.class).create
(kvConfiguration2, String.class, JsonDataEncoder.create
(String.class), new KeyValueCallbackslastore (), context);
/*state.kvStoresla = new KeyValueAccessor<TradeStateIntState>(
kvConfiguration2, cloudlet, new JsonDataEncoder<String>(
String.class));*/
// kvStore Aggiunto per l'interfaccia grafica
final IConfiguration kvConfiguration3 = configuration
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("mhttpgwkv"));
context.kvStoremhttpgw = context.cloudlet.getConnectorFactory
(IKvStoreConnectorFactory.class).create
(kvConfiguration3, String.class, JsonDataEncoder.create
(String.class), new KeyValueCallbackmhttpgw (), context);
/*state.kvStoremhttpgw = new KeyValueAccessor<TradeStateIntState>(
kvConfiguration3, cloudlet, new JsonDataEncoder<String>(
String.class));*/
//Fine kv grafico
// kvStore Aggiunto per xml grafica
final IConfiguration kvConfiguration4 = configuration
.spliceConfiguration(ConfigurationIdentifier
.resolveAbsolute("xmlstore"));
context.kvStorexml = context.cloudlet.getConnectorFactory
(IKvStoreConnectorFactory.class).create