Package com.opengamma.financial.view.rest

Examples of com.opengamma.financial.view.rest.RemoteViewProcessor


    jmsConnectorFactoryBean.setName("Masters");

    JmsConnector jmsConnector = jmsConnectorFactoryBean.getObjectCreating();
    ScheduledExecutorService heartbeatScheduler = Executors.newSingleThreadScheduledExecutor();
    try {
      ViewProcessor vp = new RemoteViewProcessor(
          vpBase,
          jmsConnector,
          heartbeatScheduler);
      ViewClient vc = vp.createViewClient(UserPrincipal.getLocalUser());

      HistoricalMarketDataSpecification marketDataSpecification = MarketData.historical(observationDate, null);

      ViewExecutionOptions executionOptions = ExecutionOptions.batch(valuationTime, marketDataSpecification, null);
View Full Code Here


    factory.setClientBrokerUri(jmsBrokerUri);
    JmsConnector jmsConnector = factory.getObjectCreating();
   
    URI uri = UriBuilder.fromUri(info.getUri()).build();
   
    return new RemoteViewProcessor(uri, jmsConnector, _scheduler);
  }
View Full Code Here

    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

    return _components;
  }

  public RemoteViewProcessor getViewProcessor(final String name) {
    final URI uri = _components.getComponentInfo(ViewProcessor.class, name).getUri();
    return new RemoteViewProcessor(uri, _jmsConnector, _scheduler);
  }
View Full Code Here

    ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(uri);
    JmsConnectorFactoryBean factory = new JmsConnectorFactoryBean();
    factory.setName(getClass().getSimpleName());
    factory.setConnectionFactory(cf);
    factory.setClientBrokerUri(uri);
    ViewProcessor vp = new RemoteViewProcessor(vpBase, factory.getObjectCreating(), Executors.newSingleThreadScheduledExecutor());
    startViewer(vp);
  }
View Full Code Here

    if (configMasters.size() == 0) {
      s_logger.warn("No config masters found at {}", getRemoteComponentFactory().getBaseUri());
      return;
    }

    final RemoteViewProcessor viewProcessor = viewProcessors.get(0);
    final MarketDataSnapshotter marketDataSnapshotter = viewProcessor.getMarketDataSnapshotter();
   
    Set<ConfigDocument> viewDefinitions = Sets.newHashSet();
   
    for (final ConfigMaster configMaster : configMasters) {
      final ConfigSearchRequest<ViewDefinition> request = new ConfigSearchRequest<ViewDefinition>(ViewDefinition.class);
View Full Code Here

            continue;
          }
          if (ViewProcessor.class.equals(componentInfo.getType())) {
            final JmsConnector jmsConnector = createJmsConnector(componentInfo);
            final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("rvp"));
            ViewProcessor vp = new RemoteViewProcessor(componentInfo.getUri(), jmsConnector, scheduler);
            toolContext.setViewProcessor(vp);
            toolContext.setContextManager(new Closeable() {
              @Override
              public void close() throws IOException {
                scheduler.shutdownNow();
View Full Code Here

  //-------------------------------------------------------------------------
  public RemoteViewProcessor getViewProcessor(String vpId) {
    ComponentInfo info = getComponentServer().getComponentInfo(ViewProcessor.class, "main");
    URI uri = info.getUri();
    JmsConnector jmsConnector = getJmsConnector(info);
    return new RemoteViewProcessor(uri, jmsConnector, Executors.newSingleThreadScheduledExecutor());
  }
View Full Code Here

  public List<RemoteViewProcessor> getViewProcessors() {
    List<RemoteViewProcessor> result = new ArrayList<RemoteViewProcessor>();
    for (ComponentInfo info : getComponentServer().getComponentInfos(ViewProcessor.class)) {
      URI uri = info.getUri();
      JmsConnector jmsConnector = getJmsConnector(info);
      RemoteViewProcessor vp = new RemoteViewProcessor(uri, jmsConnector, Executors.newSingleThreadScheduledExecutor());
      result.add(vp);
    }
    return result;
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Override
  protected void initComponent(ComponentRepository repo, ComponentInfo info) {
    if (ViewProcessor.class.isAssignableFrom(info.getType())) {
      ViewProcessor viewProcessor = new RemoteViewProcessor(info.getUri(), _jmsConnector, Executors.newSingleThreadScheduledExecutor());
      repo.registerComponent(info, viewProcessor);
      if (isPublishRest()) {
        repo.getRestComponents().republish(info);
      }
    }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.view.rest.RemoteViewProcessor

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.