Package eu.mosaic_cloud.sla

Source Code of eu.mosaic_cloud.sla.TradeStateSec2_dev10$LifeCycleHandler

package eu.mosaic_cloud.sla;

import java.io.UnsupportedEncodingException;
import java.util.Vector;

import eu.mosaic_cloud.cloudlets.connectors.kvstore.IKvStoreConnector;
import eu.mosaic_cloud.cloudlets.connectors.kvstore.IKvStoreConnectorFactory;
import eu.mosaic_cloud.cloudlets.connectors.kvstore.KvStoreCallbackCompletionArguments;
import eu.mosaic_cloud.cloudlets.connectors.queue.amqp.AmqpQueueConsumeCallbackArguments;
import eu.mosaic_cloud.cloudlets.connectors.queue.amqp.IAmqpQueueConsumerConnector;
import eu.mosaic_cloud.cloudlets.connectors.queue.amqp.IAmqpQueueConsumerConnectorFactory;
import eu.mosaic_cloud.cloudlets.connectors.queue.amqp.IAmqpQueuePublisherConnector;
import eu.mosaic_cloud.cloudlets.connectors.queue.amqp.IAmqpQueuePublisherConnectorFactory;
import eu.mosaic_cloud.cloudlets.core.CallbackArguments;
import eu.mosaic_cloud.cloudlets.core.CloudletCallbackArguments;
import eu.mosaic_cloud.cloudlets.core.CloudletCallbackCompletionArguments;
import eu.mosaic_cloud.cloudlets.core.GenericCallbackCompletionArguments;
import eu.mosaic_cloud.cloudlets.core.ICallback;
import eu.mosaic_cloud.cloudlets.core.ICloudletController;
import eu.mosaic_cloud.cloudlets.tools.DefaultAmqpPublisherConnectorCallback;
import eu.mosaic_cloud.cloudlets.tools.DefaultAmqpQueueConsumerConnectorCallback;
import eu.mosaic_cloud.cloudlets.tools.DefaultCloudletCallback;
import eu.mosaic_cloud.cloudlets.tools.DefaultKvStoreConnectorCallback;
import eu.mosaic_cloud.platform.core.configuration.ConfigurationIdentifier;
import eu.mosaic_cloud.platform.core.configuration.IConfiguration;
import eu.mosaic_cloud.platform.core.utils.JsonDataEncoder;
import eu.mosaic_cloud.platform.core.utils.NullDataEncoder;
import eu.mosaic_cloud.platform.core.utils.PlainTextDataEncoder;
import eu.mosaic_cloud.tools.callbacks.core.CallbackCompletion;
import com.google.gson.Gson;

public class TradeStateSec2_dev10 {
 
 
 
  public static final class KeyValueByteInterCallback
  extends DefaultKvStoreConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvByteInterStore destroyed successfully.");
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvByteInterStore initialized successfully.");
 
  return ICallback.SUCCESS;
  }

public CallbackCompletion<Void> setSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
  this.logger.info("Set kvByteInterStore : OK");
 
 
 
  return ICallback.SUCCESS;
 
  }
public CallbackCompletion<Void> getSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Get kvByteInterStore Succeded: OK");
 
 
  return ICallback.SUCCESS;
 
  }
 
 

 
  public static final class KeyValueInterfaceCallback
  extends DefaultKvStoreConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvInterfaceStore destroyed successfully.");
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvInterfaceStore initialized successfully.");
 
  return ICallback.SUCCESS;
  }

public CallbackCompletion<Void> setSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
  this.logger.info("Set kvInterfaceStore : OK");
 
 
 
  return ICallback.SUCCESS;
 
  }
public CallbackCompletion<Void> getSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Get kvInterfaceStore Succeded: OK");
 
 
  return ICallback.SUCCESS;
 
  }
}
 
 
  public static final class KeyValueOptionAvailableCallback
  extends DefaultKvStoreConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvOptionAvailableStore destroyed successfully.");
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvOptionAvailableStore initialized successfully.");
 
  return ICallback.SUCCESS;
  }

public CallbackCompletion<Void> setSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
  this.logger.info("Set kvOptionAvailable : OK");
 
  try {
    Thread.sleep(8000);
  } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
 
  context.kvStatus.set(arguments.getKey(), "EvaluationEnded", null);
  context.kvinterface.set(context.interfaceState, "{'EvaluationState': 'EvaluationEnded'}", null);
 
  return ICallback.SUCCESS;
 
  }
public CallbackCompletion<Void> getSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Get kvOptionAvailableStore Succeded: OK");
 
  String kv=arguments.getKey();
  String vl=(String)arguments.getValue();
  this.logger.info("GetKey: "+kv);
  this.logger.info("GetValue: "+vl);
 
  return ICallback.SUCCESS;
 
  }
}
 
 
 
 
 
 
  public static final class KeyValueSlaCallback
  extends DefaultKvStoreConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvslastore destroyed successfully.");
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvslastore initialized successfully.");
 
  return ICallback.SUCCESS;
  }

public CallbackCompletion<Void> setSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Set kvSlaStore : OK");
 
  return ICallback.SUCCESS;
 
  }
public CallbackCompletion<Void> getSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Get kvSlaStore Succeded: OK");
 
  String kv=arguments.getKey();
  String vl=(String)arguments.getValue();
  this.logger.info("GetKey: "+kv);
  this.logger.info("GetValue: "+vl);
 
  return ICallback.SUCCESS;
 
  }
}
 
 
 
  public static final class KeyValueStatusCallback
  extends DefaultKvStoreConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvStatusStore destroyed successfully.");
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet kvStatusStore initialized successfully.");
 
  return ICallback.SUCCESS;
  }

public CallbackCompletion<Void> setSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
 
  this.logger.info("Set KvStatus : OK");
  this.logger.info("Current State: "+arguments.getValue()+"- Neg Id: "+arguments.getKey());
 
  String id=arguments.getKey();
 
  if(arguments.getValue().equals("null")){ //Case: State=null. New evaluation for same user
   
      context.kvStatus.get(id, null);
  }
 
  /*if(arguments.getValue().equals("OptionAvailable")){ //Case: State=OptionAvailable
   
        context.kvStatus.get(arguments.getKey(), null);//get on kvStatus to verify Status
   
    }*/
 
  if(arguments.getValue().equals("EvaluationEnded")){ //Case: State=NegotiationClosed
   
    this.logger.info("Evaluation id "+arguments.getKey()+" Ended.");
   
  }
 
 

  return ICallback.SUCCESS;
 
  }
public CallbackCompletion<Void> getSucceeded (final TradeStateSecContext context, final KvStoreCallbackCompletionArguments<String, Void> arguments)
  {
  this.logger.info("Get kvStatusStore Succeded: OK");
  String kv=arguments.getKey();
  String vl=null;
  if (arguments.getValue()==null){
    vl=new String("null");}
  else {
  vl=new String(arguments.getValue());}
 
  this.logger.info("GetNegId: "+kv);
  this.logger.info("GetState: "+vl);
 
  //Check on State to do appropriate operation
  if(vl.equals("null")||vl.equals("OptionAvailable")){
   
    this.logger.info("Case: Status=null");
    context.kvStatus.set(kv, "Evaluating", null);//Change State
    context.kvinterface.set(context.interfaceState, "{'EvaluationState': 'Evaluating'}", null);
   
    String pub=context.messages.get(Integer.parseInt(kv));//get message to publish to SecLAev, from Vector with appropriate id
    context.seclaevpublisher.publish(pub, null);//push message to SecLAev
   
   
   
  }
 
  //Option are Available, setting results as a String in kvResult
  if(vl.equals("OptionAvailable")){
   
    this.logger.info("Case: OptionAvailable, ready to set Results in kvResult");
    int i=context.result.length;
    String result="";
    String a="-----------------------------------PROPOSAL-----------------------------------\n";
   
    for(int j=0;j<i;j++){
     
      result= result+"\n"+a+context.result[j].getName()+"\n"+context.result[j].getSecLa()+"\n";
     
        }//end "for"
   
    this.logger.info("Results: "+result);
   
    context.kvOption.set(kv, result);//Results ready for User
   
     }//end "if"
 
  return ICallback.SUCCESS;
 
  }
}
 
 
 
 
  public static final class AmqpUserCallback
  extends DefaultAmqpQueueConsumerConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> acknowledgeSucceeded (final TradeStateSecContext context, final GenericCallbackCompletionArguments<Void> arguments)
  {
 
  return ICallback.SUCCESS;
 
  }

@Override
public CallbackCompletion<Void> consume (final TradeStateSecContext context, final AmqpQueueConsumeCallbackArguments<String> arguments)
  {
  //User Request consume
  this.logger.info("Entered TradeStateSec consume (User request)");
 
  String data=arguments.getMessage();
  this.logger.info ("TradeStateSecCloudlet received message from SLAgw:"+data);
 
  //push to SlaStore anycase
  context.slastorepublisher.publish(data, null);
 
  //json conversion in my StringWSAG class with setter and getter methods
  context.objectwsag=context.gson.fromJson(data,StringWSAG.class);
 
  this.logger.info("Conversion done: type: "+context.objectwsag.getType()+" Id: "+context.objectwsag.getId());
 
  String type=context.objectwsag.getType();
 
  //Message id
  String ID=context.objectwsag.getId();
  int id=Integer.parseInt(ID);
 
  //Type Sumbit handling:evaluation process starts only with this type of messages
  if(type.equals("Submit")){
     
    this.logger.info("Type Sumbit message");
   
     if(!context.keys.contains(ID)){
       
      context.keys.add(ID);
      context.messages.add(id, data);//Messages handling for multiple requests
      this.logger.info("Got message, ready to check on State");
      context.kvStatus.get(ID, null);//Check on State for this message
     
     }else { String check=context.messages.get(id);
               if(!check.equals(data)){
               
                         this.logger.info("Got new message from this user, ready to check on State");
                         context.kvStatus.set(ID, "null", null);//Check on State for this message
                         context.kvinterface.set(context.interfaceState, "{'EvaluationState': 'null'}", null);
                        
                        
                     }else {this.logger.info("Bad request message");} //Same id messages are ignored
              
          }
   
  }else {this.logger.info("No Evaluation Process for this type");}//Different type messages don't need evaluating process
 
  context.userconsumer.acknowledge (arguments.getToken ());
 
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet SLAgwConsumer destroyed successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet SLAgwConsumer initialized successfully.");
  return ICallback.SUCCESS;
  }
}

 
 
 
  public static final class AmqpResultCallback
  extends DefaultAmqpQueueConsumerConnectorCallback<TradeStateSecContext, StringQPT, Void>
{
@Override
public CallbackCompletion<Void> acknowledgeSucceeded (final TradeStateSecContext context, final GenericCallbackCompletionArguments<Void> arguments)
  {
 
  return ICallback.SUCCESS;
 
  }

@Override
public CallbackCompletion<Void> consume (final TradeStateSecContext context, final AmqpQueueConsumeCallbackArguments<StringQPT> arguments)
  {
  //Message received from SecLAev with my evaluation results
  this.logger.info("Entered Result queue consume from SecLaev");
  context.msg=arguments.getMessage();
 
  //message contains results list and the request id
  String id=context.msg.getId();
  context.result=context.msg.getlist();
 
  this.logger.info ("TradeStateSecCloudlet received ProviderSortedList from SecLAevaluation:");
 
  for(int i=0;i<context.result.length;i++){
    this.logger.info("Numero "+(i+1)+": Nome Provider: "+context.result[i].getName());
  }
 
  try {
    Thread.sleep(8000);
  } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
 
  context.kvStatus.set(id, "OptionAvailable", null); //Change State
  context.kvinterface.set(context.interfaceState, "{'EvaluationState': 'OptionAvailable'}", null);
 
  this.logger.info("Ready to set Results in kvResult");
  int i=context.result.length;
  String result="";
  String a="-----------------------------------PROPOSAL-----------------------------------\n";
 
  for(int j=0;j<i;j++){
   
    result= result+"\n"+a+context.result[j].getName()+"\n"+context.result[j].getSecLa()+"\n";
   
      }//end "for"
 
  this.logger.info("Results: "+result);
 
  /*
  byte[] resultbyte=null;
  try{ resultbyte=result.getBytes("ISO-8859-1");
  
  }catch(UnsupportedEncodingException e){
    //TODO Auto-generated catch block
    e.printStackTrace();
  }
  */
 
  context.kvOption.set(id, result);//Results ready for User
  context.kvbyteinter.set(context.interfaceResult, result, null);
 
   context.seclaevconsumer.acknowledge (arguments.getToken ());
   return ICallback.SUCCESS;
  
  }

@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet SecLaEvConsumer destroyed successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet SecLaEvConsumer initialized successfully.");
  return ICallback.SUCCESS;
  }
}


 
 
  public static final class AmqpSecLAevCallback
  extends DefaultAmqpPublisherConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet publisher to SecLAev destroyed successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet publisher to SecLAev initialized successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> publishSucceeded (final TradeStateSecContext context, final GenericCallbackCompletionArguments<Void> arguments)
  {
  this.logger.info("Push to SecLaev: OK");
 
 
 
  return ICallback.SUCCESS;
  }
}
 
 
  public static final class AmqpSlaStoreCallback
  extends DefaultAmqpPublisherConnectorCallback<TradeStateSecContext, String, Void>
{
@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("SecLAEvaluationCloudlet produttore destroyed successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CallbackArguments arguments)
  {
  this.logger.info ("TradeStateSecCloudlet produttore initialized successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> publishSucceeded (final TradeStateSecContext context, final GenericCallbackCompletionArguments<Void> arguments)
  {
  this.logger.info("Push to SlaStore: OK");
 
  return ICallback.SUCCESS;
  }
}
 
 

  public static final class LifeCycleHandler
  extends DefaultCloudletCallback<TradeStateSecContext>
{
@Override
public CallbackCompletion<Void> destroy (final TradeStateSecContext context, final CloudletCallbackArguments<TradeStateSecContext> arguments)
  {
  this.logger.info ("TradeStateSecCloudlet destroying...");
  return context.seclaevpublisher.destroy ();
  }

@Override
public CallbackCompletion<Void> destroySucceeded (final TradeStateSecContext context, final CloudletCallbackCompletionArguments<TradeStateSecContext> arguments)
  {
  this.logger.info ("TradeStateSecCloudlet destroyed successfully.");
  return ICallback.SUCCESS;
  }

@Override
public CallbackCompletion<Void> initialize (final TradeStateSecContext context, final CloudletCallbackArguments<TradeStateSecContext> arguments)
  {
  this.logger.info ("TradeStateSecCloudlet initializing...");
 
  context.cloudlet = arguments.getCloudlet ();
 
  context.messages.setSize(400);
 
 
  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 kvOptionAvailableConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("kvoption"));
  context.kvOption = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvOptionAvailableConfiguration, String.class, JsonDataEncoder.create(String.class), new KeyValueOptionAvailableCallback (), context);
 
  final IConfiguration kvSlaConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("kvsla"));
  context.kvSla = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvSlaConfiguration, String.class, JsonDataEncoder.create(String.class), new KeyValueSlaCallback (), context);
 
  final IConfiguration kvStatusConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("kvstatus"));
  context.kvStatus = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvStatusConfiguration, String.class, JsonDataEncoder.create(String.class), new KeyValueStatusCallback (), context);
 
  final IConfiguration kvInterfaceConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("kvinterface"));
  context.kvinterface = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvInterfaceConfiguration, String.class, JsonDataEncoder.create(String.class), new KeyValueInterfaceCallback (), context);
 
  final IConfiguration kvByteInterConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("kvbyteinter"));
  context.kvbyteinter = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvByteInterConfiguration, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new KeyValueByteInterCallback (), context);
 
  final IConfiguration queueUserConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queue.user"));
  context.userconsumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueUserConfiguration, String.class, JsonDataEncoder.create(String.class), new AmqpUserCallback (), context);
 
  final IConfiguration queueResultConfiguration = configuration2.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queue.result"));
  context.seclaevconsumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueResultConfiguration, StringQPT.class, JsonDataEncoder.create(StringQPT.class), new AmqpResultCallback (), context);
 
  final IConfiguration queueSecLAevConfiguration = configuration3.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queue.seclaev"));
  context.seclaevpublisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueSecLAevConfiguration, String.class, JsonDataEncoder.create(String.class), new AmqpSecLAevCallback (), context);
 
  final IConfiguration queueSlaStoreConfiguration = configuration4.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queue.slastore"));
  context.slastorepublisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueSlaStoreConfiguration, String.class, JsonDataEncoder.create(String.class), new AmqpSlaStoreCallback (), context);
 
 
 
  return CallbackCompletion.createAndChained (context.kvbyteinter.initialize(),context.kvinterface.initialize(),context.kvOption.initialize(),context.kvStatus.initialize(),context.kvSla.initialize(),context.userconsumer.initialize (),context.seclaevconsumer.initialize(),context.seclaevpublisher.initialize(),context.slastorepublisher.initialize());
  }

@Override
public CallbackCompletion<Void> initializeSucceeded (final TradeStateSecContext context, final CloudletCallbackCompletionArguments<TradeStateSecContext> arguments)
  {
 
  this.logger.info ("TradeStateSecCloudlet initialized successfully.");
 
  return ICallback.SUCCESS;
  }
}
 
 

 
  public static final class TradeStateSecContext
  {
   
    ICloudletController<TradeStateSecContext> cloudlet;
    //kvstores
    IKvStoreConnector<String, Void> kvOption;//store in cui inserire il risultato per l'utente
    IKvStoreConnector<String, Void> kvSla;//store riguardante anche slastore
    IKvStoreConnector<String, Void> kvStatus;//stato della negoziazione
    IKvStoreConnector<String, Void> kvinterface;//kvstore per interfaccia grafica
    IKvStoreConnector<String, Void> kvbyteinter;//kvstore  a byte per interfaccia grafica
   
   
    //queues
    IAmqpQueueConsumerConnector<String, Void> userconsumer;//consumatore da slagw, da valutare che tipo di dato è scambiato
    IAmqpQueuePublisherConnector<String, Void> seclaevpublisher;//produttore verso seclaev, da valutare tipo di dato da inviare
    IAmqpQueueConsumerConnector<StringQPT, Void> seclaevconsumer;//consumatore coda result da seclaev ,arriva una lista QPT
    IAmqpQueuePublisherConnector<String, Void> slastorepublisher;//produttore verso slastore, da valutare tipo di dato da inviare
   
    //Usage data
    StringQPT msg;
    StringWSAG objectwsag=new StringWSAG();
    Gson gson=new Gson();
    QPT result[];
    QPT userchoice;
    Vector<String> keys=new Vector<String>();
    Vector<String> messages=new Vector<String>();
    String interfaceState="interfaceState";
    String interfaceResult="interfaceResult";
   
   
  }
 
 
}
TOP

Related Classes of eu.mosaic_cloud.sla.TradeStateSec2_dev10$LifeCycleHandler

TOP
Copyright © 2018 www.massapi.com. 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.