Examples of ITradingAgentFactory


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

Examples of com.quantcomponents.algo.ITradingAgentFactory

    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

Examples of com.quantcomponents.algo.ITradingAgentFactory

    }
    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

Examples of com.quantcomponents.algo.ITradingAgentFactory

    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
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.