Examples of attachToViewProcess()


Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

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

      ViewExecutionOptions executionOptions = ExecutionOptions.batch(valuationTime, marketDataSpecification, null);

      vc.attachToViewProcess(viewDefinitionUniqueId, executionOptions);
      vc.waitForCompletion();
    } finally {
      heartbeatScheduler.shutdown();
    }
  }
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    marketDataProvider.addValue(ViewProcessorTestEnvironment.getPrimitive1(), (byte) 1);
    marketDataProvider.addValue(ViewProcessorTestEnvironment.getPrimitive2(), (byte) 2);

    final ViewExecutionOptions executionOptions = ExecutionOptions.batch(null, MarketData.live(), null);

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    assertTrue(viewProcess.getState() == ViewProcessState.RUNNING);
    client.waitForCompletion();
    //
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

      } else {
        s_logger.warn("Not running in batch mode and no listener specified, the results would be ignored. Exiting.");
        return;
      }
      s_logger.info("Attaching to view process, view def ID {}, execution options {}", viewDefId, executionOptions);
      viewClient.attachToViewProcess(viewDefId, executionOptions, true);
      try {
        viewClient.waitForCompletion();
      } catch (InterruptedException e) {
        s_logger.warn("Interrupted waiting for ViewClient to complete", e);
      }
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    ViewProcessorImpl vp = env.getViewProcessor();
    vp.start();

    ViewClient client = vp.createViewClient(UserPrincipal.getTestUser());
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), ExecutionOptions.infinite(MarketData.live()));

    BlockingDependencyGraphExecutor executor = dgef.getExecutorInstance();
    assertTrue(executor.awaitFirstRun(TIMEOUT));

    // We're now blocked in the execution of the initial cycle
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    env.init();
    final ViewProcessorImpl vp = env.getViewProcessor();
    vp.start();

    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), ExecutionOptions.infinite(MarketData.live()));

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());

    assertEquals(env.getViewDefinition().getUniqueId(), viewProcess.getDefinitionId());
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    env.init();
    final ViewProcessorImpl vp = env.getViewProcessor();
    vp.start();

    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), ExecutionOptions.infinite(MarketData.live()));

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());

    assertNull(client.getLatestResult());
    assertEquals(env.getViewDefinition(), viewProcess.getLatestViewDefinition());
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    client.resume();
    assertEquals(ViewClientState.STARTED, client.getState());

    assertEquals(client, vp.getViewClient(client.getUniqueId()));

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), ExecutionOptions.infinite(MarketData.live()));
    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    viewProcess.stop();

    // Should automatically detach the client
    assertFalse(client.isAttached());
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    final Instant time0 = Instant.now();
    final ViewCycleExecutionOptions defaultCycleOptions = ViewCycleExecutionOptions.builder().setMarketDataSpecification(MarketData.live()).create();
    final ViewExecutionOptions executionOptions = new ExecutionOptions(ArbitraryViewCycleExecutionSequence.of(time0, time0.plusMillis(10), time0.plusMillis(20), time0.plusMillis(30)), ExecutionFlags
        .none().get(), defaultCycleOptions);

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    final ViewProcessWorker worker = env.getCurrentWorker(viewProcess);

    final CompiledViewDefinitionWithGraphsImpl compilationModel1 = (CompiledViewDefinitionWithGraphsImpl) resultListener.getViewDefinitionCompiled(Timeout.standardTimeoutMillis())
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    final Instant time0 = Instant.now();
    final ViewCycleExecutionOptions defaultCycleOptions = ViewCycleExecutionOptions.builder().setMarketDataSpecification(MarketData.live()).create();
    final ViewExecutionOptions executionOptions = new ExecutionOptions(ArbitraryViewCycleExecutionSequence.of(time0), ExecutionFlags.none().get(), defaultCycleOptions);

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    final ViewProcessWorker worker = env.getCurrentWorker(viewProcess);

    resultListener.expectNextCall(ViewDefinitionCompiledCall.class, 10 * Timeout.standardTimeoutMillis());
 
View Full Code Here

Examples of com.opengamma.engine.view.client.ViewClient.attachToViewProcess()

    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);

    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), ExecutionOptions.infinite(MarketData.live(), ExecutionFlags.none().get()));

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    assertEquals(ViewProcessState.RUNNING, viewProcess.getState());

    resultListener.expectNextCall(ViewDefinitionCompiledCall.class, Timeout.standardTimeoutMillis());
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.