Package com.opengamma.livedata.client

Examples of com.opengamma.livedata.client.JmsLiveDataClient


  public static JmsLiveDataClient getJmsClient(StandardLiveDataServer server) {
    ByteArrayFudgeRequestSender subscriptionRequestSender = getSubscriptionRequestSender(server);
    ByteArrayFudgeRequestSender entitlementRequestSender = getEntitlementRequestSender(server);
   
    JmsConnector jmsConnector = ActiveMQTestUtils.createTestJmsConnector();
    JmsLiveDataClient liveDataClient = new JmsLiveDataClient(
        subscriptionRequestSender,
        entitlementRequestSender,
        jmsConnector);
   
    JmsSenderFactory factory = new JmsSenderFactory();
    factory.setJmsConnector(jmsConnector);
    server.setMarketDataSenderFactory(factory);
   
    liveDataClient.setFudgeContext(liveDataClient.getFudgeContext());
    liveDataClient.start();
   
    return liveDataClient;
  }
View Full Code Here


    ByteArrayFudgeRequestSender fudgeSubscriptionRequestSender = new ByteArrayFudgeRequestSender(jmsSubscriptionRequestSender);
   
    JmsByteArrayRequestSender jmsEntitlementRequestSender = new JmsByteArrayRequestSender(metaData.getJmsEntitlementTopic(), jmsTemplate);
    ByteArrayFudgeRequestSender fudgeEntitlementRequestSender = new ByteArrayFudgeRequestSender(jmsEntitlementRequestSender);
   
    final JmsLiveDataClient liveDataClient = new JmsLiveDataClient(fudgeSubscriptionRequestSender,
        fudgeEntitlementRequestSender, getJmsConnector(), OpenGammaFudgeContext.getInstance(), JmsLiveDataClient.DEFAULT_NUM_SESSIONS);
    liveDataClient.setFudgeContext(OpenGammaFudgeContext.getInstance());
    if (metaData.getJmsHeartbeatTopic() != null) {
      JmsByteArrayMessageSender jmsHeartbeatSender = new JmsByteArrayMessageSender(metaData.getJmsHeartbeatTopic(), jmsTemplate);
      liveDataClient.setHeartbeatMessageSender(jmsHeartbeatSender);
    }
    liveDataClient.start();
    liveDataClient.registerMetrics(OpenGammaMetricRegistry.getSummaryInstance(), OpenGammaMetricRegistry.getDetailedInstance(), "LiveDataClient - " + provider.metaData().getDescription());
    return liveDataClient;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.livedata.client.JmsLiveDataClient

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.