Package com.opengamma.component

Examples of com.opengamma.component.ComponentInfo


  /**
   * @param preferredClassifiers a list of names of classifiers in order of preference (most preferred first), or null
   * @return the best matching master available
   */ 
  public ConfigSource getConfigSource(final List<String> preferredClassifiers) {
    ComponentInfo componentInfo = getTopLevelComponent(preferredClassifiers, ConfigSource.class);
    return new RemoteConfigSource(componentInfo.getUri());
  }
View Full Code Here


   */
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
    HistoricalTimeSeriesLoader loader = createHistoricalTimeSeriesLoader(repo);
   
    ComponentInfo info = new ComponentInfo(HistoricalTimeSeriesLoader.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteHistoricalTimeSeriesLoader.class);
    repo.registerComponent(info, loader);
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataHistoricalTimeSeriesLoaderResource(loader));
    }
  }
View Full Code Here

  private String _threadNamePrefix = DEFAULT_THREAD_PREFIX;

  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {

    final ComponentInfo info = new ComponentInfo(ScheduledExecutorService.class, getClassifier());
    final ScheduledExecutorService component = initScheduledExecutorService();
    repo.registerComponent(info, component);

  }
View Full Code Here


  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final PositionMaster master = new InMemoryPositionMaster();
    final ComponentInfo info = new ComponentInfo(PositionMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePositionMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, InMemoryPositionMaster.DEFAULT_OID_SCHEME);
    repo.registerComponent(info, master);

    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataPositionMasterResource(master));
    }
View Full Code Here

  private String _classifier;

  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {

    final ComponentInfo info = new ComponentInfo(FudgeContext.class, getClassifier());
    final FudgeContext component = initFudgeContext();
    repo.registerComponent(info, component);

  }
View Full Code Here


  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final PortfolioMaster master = new InMemoryPortfolioMaster();
    final ComponentInfo info = new ComponentInfo(PortfolioMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePortfolioMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, InMemoryPortfolioMaster.DEFAULT_OID_SCHEME);
    repo.registerComponent(info, master);

    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataPortfolioMasterResource(master));
    }
View Full Code Here

    final MarketDataAvailabilityFilter availability = createAvailabilityFilter(provider);
    final LiveDataFactory defaultFactory = new LiveDataFactory(liveDataClient, availability);
    final Map<String, LiveDataFactory> factoryMap = ImmutableMap.of(SIMULATED_LIVE_SOURCE_NAME, defaultFactory);
    final MarketDataProviderFactory marketDataProviderFactory = new InMemoryLKVLiveMarketDataProviderFactory(defaultFactory, factoryMap);

    final ComponentInfo info = new ComponentInfo(MarketDataProviderFactory.class, getClassifier());
    repo.registerComponent(info, marketDataProviderFactory);
    return marketDataProviderFactory;
  }
View Full Code Here

  private NamedMarketDataSpecificationRepository initNamedMarketDataSpecificationRepository(final ComponentRepository repo) {
    final InMemoryNamedMarketDataSpecificationRepository specRepository = new InMemoryNamedMarketDataSpecificationRepository();

    specRepository.addSpecification(SIMULATED_LIVE_SOURCE_NAME, new LiveMarketDataSpecification(SIMULATED_LIVE_SOURCE_NAME));
    final ComponentInfo info = new ComponentInfo(NamedMarketDataSpecificationRepository.class, getClassifier());
    repo.registerComponent(info, specRepository);
    return specRepository;
  }
View Full Code Here

    SecurityMaster master = new EHCachingSecurityMaster(getClassifier(),
                                                        getUnderlying(),
                                                        getCacheManager());

    // register
    ComponentInfo info = new ComponentInfo(SecurityMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 2);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteSecurityMaster.class);
    repo.registerComponent(info, master);
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataSecurityMasterResource(master));
    }
  }
View Full Code Here

    if (getProvider5() != null) {
      maxLevel = buildProviders(repo, getProvider5(), map, acceptedTypes, maxLevel);
    }
   
    final HistoricalTimeSeriesProvider provider = new DelegatingHistoricalTimeSeriesProvider(map);
    final ComponentInfo info = new ComponentInfo(HistoricalTimeSeriesProvider.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, (maxLevel + 1));
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteHistoricalTimeSeriesProvider.class);
    info.addAttribute(ComponentInfoAttributes.ACCEPTED_TYPES, Joiner.on(',').join(acceptedTypes));
    repo.registerComponent(info, provider);
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataHistoricalTimeSeriesProviderResource(provider));
    }
  }
View Full Code Here

TOP

Related Classes of com.opengamma.component.ComponentInfo

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.