Created
May 23, 2012 18:13
-
-
Save Vineeth-Mohan/2776780 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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