Package com.opengamma.engine.marketdata.resolver

Examples of com.opengamma.engine.marketdata.resolver.MarketDataProviderResolver


    functions.compileRules();
    builder.setFunctionResolver(functions);
    builder.setFunctionExclusionGroups(_builderContext.getFunctionExclusionGroups());
    // TODO this isn't used. is this OK?
    final UserPrincipal marketDataUser = UserPrincipal.getLocalUser();
    final MarketDataProviderResolver resolver = _builderContext.getMarketDataProviderResolver();
    List<MarketDataSpecification> marketData = properties.getMarketData();
    if (marketData == null || marketData.isEmpty()) {
      marketData = Collections.<MarketDataSpecification>singletonList(MarketData.live());
    }
   
View Full Code Here


    }
  };

  private DependencyGraphExecutionFuture executeTestJob(final DependencyGraphExecutorFactory factory) {
    final InMemoryLKVMarketDataProvider marketDataProvider = new InMemoryLKVMarketDataProvider();
    final MarketDataProviderResolver marketDataProviderResolver = new SingleMarketDataProviderResolver(new SingletonMarketDataProviderFactory(marketDataProvider));
    final InMemoryFunctionRepository functionRepository = new InMemoryFunctionRepository();
    _functionCount.set(0);
    final MockFunction mockFunction = new MockFunction(ComputationTarget.NULL) {
      @Override
      public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target, final Set<ValueRequirement> desiredValues) {
View Full Code Here

      public void onMarketDataValuesChanged(Collection<ValueSpecification> valueSpecifications) { }
    };
  }

  private MarketDataProviderResolver createResolver() {
    return new MarketDataProviderResolver() {
      @Override
      public MarketDataProvider resolve(UserPrincipal marketDataUser, MarketDataSpecification snapshotSpec) {

        MarketDataProvider mock = mock(MarketDataProvider.class);
        when(mock.snapshot(any(MarketDataSpecification.class))).thenReturn(mock(CompositeMarketDataSnapshot.class));
View Full Code Here

    providerResolver.addProvider(HistoricalShockMarketDataSpecification.class, historicalShockMarketDataProviderFactory);
    return providerResolver;
  }

  private void initMarketDataProviderResolver(final ComponentRepository repo) {
    final MarketDataProviderResolver resolver = new CachingMarketDataProviderResolver(createMarketDataProviderResolver());
    final ComponentInfo info = new ComponentInfo(MarketDataProviderResolver.class, getClassifier());
    repo.registerComponent(info, resolver);
  }
View Full Code Here

    final FunctionRepository functionRepository = getFunctionRepository() != null ? getFunctionRepository() : generateFunctionRepository();
    final CompiledFunctionService compiledFunctions = new CompiledFunctionService(functionRepository, new CachingFunctionRepositoryCompiler(), functionCompilationContext);
    compiledFunctions.initialize();
    vpFactBean.setFunctionCompilationService(compiledFunctions);

    final MarketDataProviderResolver marketDataProviderResolver = getMarketDataProviderResolver() != null ? getMarketDataProviderResolver() : generateMarketDataProviderResolver();
    vpFactBean.setMarketDataProviderResolver(marketDataProviderResolver);

    vpFactBean.setConfigSource(configSource);
    vpFactBean.setViewPermissionProvider(new DefaultViewPermissionProvider());
    vpFactBean.setNamedMarketDataSpecificationRepository(new InMemoryNamedMarketDataSpecificationRepository());
View Full Code Here

    _marketDataProviderResolver = marketDataProviderResolver;
  }

  private MarketDataProviderResolver generateMarketDataProviderResolver() {
    final MarketDataProvider marketDataProvider = getMarketDataProvider() != null ? getMarketDataProvider() : generateMarketDataProvider();
    final MarketDataProviderResolver resolver = new SingleMarketDataProviderResolver(marketDataProvider);
    setMarketDataProviderResolver(resolver);
    return resolver;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.marketdata.resolver.MarketDataProviderResolver

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.