Examples of InMemorySnapshotMaster


Examples of com.opengamma.master.marketdatasnapshot.impl.InMemorySnapshotMaster

    WebPushTestUtils _webPushTestUtils = new WebPushTestUtils();
    Pair<Server, WebApplicationContext> serverAndContext =
        _webPushTestUtils.createJettyServer("classpath:/com/opengamma/web/analytics/push/marketdatasnapshotlist-test.xml");
    Server server = serverAndContext.getFirst();
    WebApplicationContext context = serverAndContext.getSecond();
    InMemorySnapshotMaster snapshotMaster = context.getBean(InMemorySnapshotMaster.class);
    snapshotMaster.add(createSnapshot("basisView1", "snap1", null));
    JSONArray json = new JSONArray(_webPushTestUtils.readFromPath("/jax/marketdatasnapshots"));
    assertEquals(1, json.length());
    JSONObject basis1Map = json.getJSONObject(0);
    assertEquals("basisView1", basis1Map.get(BASIS_VIEW_NAME));
    JSONArray snapshots = basis1Map.getJSONArray(SNAPSHOTS);
View Full Code Here

Examples of com.opengamma.master.marketdatasnapshot.impl.InMemorySnapshotMaster

  private boolean _publishRest = true;


  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final MarketDataSnapshotMaster master = new InMemorySnapshotMaster();
    final ComponentInfo info = new ComponentInfo(MarketDataSnapshotMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteMarketDataSnapshotMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, InMemorySnapshotMaster.DEFAULT_OID_SCHEME);
    repo.registerComponent(info, master);
View Full Code Here

Examples of com.opengamma.master.marketdatasnapshot.impl.InMemorySnapshotMaster

    repo.registerComponent(infoSource, source);
    repo.getRestComponents().publish(infoSource, new DataSecuritySourceResource(source));
  }

  protected void initSnapshots(final ComponentRepository repo) {
    final MarketDataSnapshotMaster master = new InMemorySnapshotMaster();
    final MarketDataSnapshotSource source = new MasterSnapshotSource(master);

    final ComponentInfo infoMaster = new ComponentInfo(MarketDataSnapshotMaster.class, "test");
    repo.registerComponent(infoMaster, master);
    repo.getRestComponents().publish(infoMaster, new DataMarketDataSnapshotMasterResource(master));
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.