Skip to content

Instantly share code, notes, and snippets.

@Vineeth-Mohan
Created May 23, 2012 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vineeth-Mohan/2776780 to your computer and use it in GitHub Desktop.
Save Vineeth-Mohan/2776780 to your computer and use it in GitHub Desktop.
HistoricalMarketDataSpecification hd = MarketData.historical(LocalDate.now(), null, null);
ViewExecutionOptions executionOptions = ExecutionOptions.singleCycle(Instant.now(), hd);
vc.setResultListener(new AbstractViewResultListener() {
@Override
public UserPrincipal getUser() {
// Authentication needed
return UserPrincipal.getLocalUser();
}
@Override
public void viewDefinitionCompiled(CompiledViewDefinition compiledViewDefinition, boolean hasMarketDataPermissions) {
System.out.println("View definition compiled: {} " + compiledViewDefinition.getViewDefinition().getName());
}
@Override
public void cycleCompleted(ViewComputationResultModel fullResult, ViewDeltaResultModel deltaResult) {
System.out.println("New result arrived for view '{}'" + fullResult.getAllResults());
}
});
System.out.println("SPEC IS " + executionOptions);
vc.attachToViewProcess(equityDefenition.getUniqueId(),executionOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment