Package com.opengamma.component

Examples of com.opengamma.component.ComponentInfo$Meta


    if (getCacheManager() != null) {
      source = new EHCachingFinancialSecuritySource(source, getCacheManager());
    }
   
    if (getUnderlyingClassifier() != null) {
      ComponentInfo info = new ComponentInfo(SecuritySource.class, getUnderlyingClassifier());
      info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
      info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteFinancialSecuritySource.class);
      repo.registerComponent(info, source);
      if (isPublishRest()) {
        repo.getRestComponents().publish(info, new DataFinancialSecuritySourceResource(source));
      }
    }
View Full Code Here


    if (getUserSecurityMaster() == null) {
      return null;
    }
    FinancialSecuritySource source = new MasterFinancialSecuritySource(getUserSecurityMaster());
    if (getUserClassifier() != null) {
      ComponentInfo info = new ComponentInfo(SecuritySource.class, getUserClassifier());
      info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
      info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteFinancialSecuritySource.class);
      repo.registerComponent(info, source);
      if (isPublishRest()) {
        repo.getRestComponents().publish(info, new DataFinancialSecuritySourceResource(source));
      }
    }
View Full Code Here

    PositionSource source = new MasterPositionSource(getUnderlyingPortfolioMaster(), getUnderlyingPositionMaster());
    if (getCacheManager() != null) {
      source = new EHCachingPositionSource(source, getCacheManager());
    }
    if (getUnderlyingClassifier() != null) {
      final ComponentInfo info = new ComponentInfo(PositionSource.class, getUnderlyingClassifier());
      info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
      info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePositionSource.class);
      repo.registerComponent(info, source);
      if (isPublishRest()) {
        repo.getRestComponents().publish(info, new DataPositionSourceResource(source));
      }
    }
View Full Code Here

    if (getUserPortfolioMaster() == null || getUserPositionMaster() == null) {
      return null;
    }
    final PositionSource source = new MasterPositionSource(getUserPortfolioMaster(), getUserPositionMaster());
    if (getUserClassifier() != null) {
      final ComponentInfo info = new ComponentInfo(PositionSource.class, getUserClassifier());
      info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
      info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePositionSource.class);
      repo.registerComponent(info, source);
      if (isPublishRest()) {
        repo.getRestComponents().publish(info, new DataPositionSourceResource(source));
      }
    }
View Full Code Here

   */
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    ConfigSource source = createConfigSource(repo);
   
    ComponentInfo info = new ComponentInfo(ConfigSource.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteConfigSource.class);
    repo.registerComponent(info, source);
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataConfigSourceResource(source));
    }
  }
View Full Code Here

 
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
    NonVersionedRedisSecuritySource source = new NonVersionedRedisSecuritySource(getRedisConnector().getJedisPool(), getRedisPrefix());
   
    ComponentInfo sourceInfo = new ComponentInfo(SecuritySource.class, getClassifier());
    sourceInfo.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    sourceInfo.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteSecuritySource.class);
    repo.registerComponent(sourceInfo, source);

    ComponentInfo redisInfo = new ComponentInfo(NonVersionedRedisSecuritySource.class, getClassifier());
    redisInfo.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    repo.registerComponent(redisInfo, source);
   
    if (isPublishRest()) {
      repo.getRestComponents().publish(sourceInfo, new DataSecuritySourceResource(source));
    }
View Full Code Here

  }

  private static WatchListRecorder create(final URI serverUri, final String viewProcessorClassifier, final String securitySourceClassifier) {
    final RemoteComponentServer remote = new RemoteComponentServer(serverUri);
    final ComponentServer server = remote.getComponentServer();
    final ComponentInfo viewProcessorInfo = server.getComponentInfo(ViewProcessor.class, viewProcessorClassifier);
    final ComponentInfo securitySourceInfo = server.getComponentInfo(SecuritySource.class, securitySourceClassifier);

    final URI uri = URI.create(viewProcessorInfo.getAttribute(ComponentInfoAttributes.JMS_BROKER_URI));
    final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(uri);
    final JmsConnectorFactoryBean factory = new JmsConnectorFactoryBean();
    factory.setName("WatchListRecorder");
    factory.setConnectionFactory(cf);
    factory.setClientBrokerUri(uri);
    final JmsConnector jmsConnector = factory.getObjectCreating();

    final ViewProcessor viewProcessor = new RemoteViewProcessor(viewProcessorInfo.getUri(), jmsConnector, Executors.newSingleThreadScheduledExecutor());
    // TODO: Not ideal; the published resolver should be used rather than an ad-hoc one created based just on the security source
    final ComputationTargetResolver targetResolver = new DefaultComputationTargetResolver(new RemoteSecuritySource(securitySourceInfo.getUri()));
    return new WatchListRecorder(viewProcessor, targetResolver);
  }
View Full Code Here

    initPaymentService(repo);
  }
 
  protected PaymentService initPaymentService(ComponentRepository repo) {
    PaymentService paymentService = new PaymentService(getViewProcessor(), getUserConfigMaster(), getPositionSource(), getSecuritySource());
    ComponentInfo info = new ComponentInfo(PaymentService.class, getClassifier());
    repo.registerComponent(info, paymentService);
    return paymentService;
  }
View Full Code Here

    RemoteComponentServer server = new RemoteComponentServer(uri);
    _componentServer = server.getComponentServer();
  }

  public ViewProcessor getViewProcessor() {
    ComponentInfo info = _componentServer.getComponentInfo(ViewProcessor.class, "main");
    URI jmsBrokerUri = URI.create(info.getAttribute(ComponentInfoAttributes.JMS_BROKER_URI));
    ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(jmsBrokerUri);
    JmsConnectorFactoryBean factory = new JmsConnectorFactoryBean();
    factory.setName(getClass().getSimpleName());
    factory.setConnectionFactory(cf);
    factory.setClientBrokerUri(jmsBrokerUri);
    JmsConnector jmsConnector = factory.getObjectCreating();
   
    URI uri = UriBuilder.fromUri(info.getUri()).build();
   
    return new RemoteViewProcessor(uri, jmsConnector, _scheduler);
  }
View Full Code Here

   
    return new RemoteViewProcessor(uri, jmsConnector, _scheduler);
  }

  public ConfigMaster getConfigMaster() {
    ComponentInfo info = _componentServer.getComponentInfo(ConfigMaster.class, "main");
    return new RemoteConfigMaster(info.getUri());
  }
View Full Code Here

TOP

Related Classes of com.opengamma.component.ComponentInfo$Meta

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.