Package com.quantcomponents.algo

Examples of com.quantcomponents.algo.ITradingAgentFactory


    return hierarchyContainer.getAllTradingAgentFactories();
  }

  @Override
  public boolean isConfigurationValid(TradingAgentFactoryHandle factoryHandle, Properties configuration, Map<String, String> messages) {
    ITradingAgentFactory factory = retrieveFactory(factoryHandle);
    return factory.isConfigurationValid(configuration, messages);
  }
View Full Code Here


    return factory.isConfigurationValid(configuration, messages);
  }
 
  @Override
  public TradingAgentConfigurationHandle createConfiguration(TradingAgentFactoryHandle factoryHandle, Properties properties, String name) {
    ITradingAgentFactory factory = retrieveFactory(factoryHandle);
    TradingAgentConfiguration configuration = new TradingAgentConfiguration(factory, properties);
    TradingAgentConfigurationHandle handle = new TradingAgentConfigurationHandle(name == null || name.equals("") ? configuration.toString() : name, factory.getInputSeriesNames());
    hierarchyContainer.putTradingAgentConfiguration(handle, configuration, factoryHandle);
    return handle;
  }
View Full Code Here

    }
    return configuration;
  }
 
  private ITradingAgentFactory retrieveFactory(TradingAgentFactoryHandle factoryHandle) {
    ITradingAgentFactory factory = hierarchyContainer.getTradingAgentFactory(factoryHandle);
    if (factory == null) {
      throw new IllegalArgumentException("Handle: " + factoryHandle + " does not correspont to an object");
    }
    return factory;
  }
View Full Code Here

    Map<IHierarchyItemHandle, HierarchyItem> factoryHierarchy = (Map<IHierarchyItemHandle, HierarchyItem>) ois.readObject();
   
    HierarchyItem factoryHierarchyItem = hierarchy.get(factoryHandle);
    handleIdentities.put(factoryHandle, factoryHandle);
   
    ITradingAgentFactory factory = factoriesByHandle.get(factoryHandle);
    for (Map.Entry<TradingAgentConfigurationHandle, Properties> entry : factoryConfigurationByHandle.entrySet()) {
      configurationByHandle.put(entry.getKey(), new TradingAgentConfiguration(factory, entry.getValue()));
      factoryHierarchyItem.children.add(entry.getKey());
      handleIdentities.put(entry.getKey(), entry.getKey());
    }
View Full Code Here

TOP

Related Classes of com.quantcomponents.algo.ITradingAgentFactory

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.