Package com.opengamma.transport

Examples of com.opengamma.transport.ByteArrayFudgeMessageReceiver


    DistributedLiveDataClient liveDataClient = new DistributedLiveDataClient(subscriptionRequestSender, entitlementRequestSender);
   
    FudgeSenderFactory factory = new FudgeSenderFactory(
        new ByteArrayFudgeMessageSender(
            new DirectInvocationByteArrayMessageSender(
                new ByteArrayFudgeMessageReceiver(liveDataClient))));
    server.setMarketDataSenderFactory(factory);
   
    liveDataClient.setFudgeContext(liveDataClient.getFudgeContext());
   
    return liveDataClient;
View Full Code Here


  }

  private String startJms() throws JMSException {
    try {
      _startedSignalLatch = new CountDownLatch(1);
      ByteArrayFudgeMessageReceiver bafmr = new ByteArrayFudgeMessageReceiver(new FudgeMessageReceiver() {
        @SuppressWarnings("unchecked")
        @Override
        public void messageReceived(FudgeContext fudgeContext, FudgeMsgEnvelope msgEnvelope) {
          s_logger.debug("Result listener call received");
          Function<ViewResultListener, ?> listenerCall;
View Full Code Here

    return new Callable<Map<String, Runnable>>() {
      @Override
      public Map<String, Runnable> call() {
        Session session = _sessions.get(sessionIndex);

        ByteArrayFudgeMessageReceiver fudgeReceiver = new ByteArrayFudgeMessageReceiver(JmsLiveDataClient.this, getFudgeContext());
        final JmsByteArrayMessageDispatcher jmsDispatcher = new JmsByteArrayMessageDispatcher(fudgeReceiver);

        return startReceivingTicks(specs, session, jmsDispatcher);
      }
    };
View Full Code Here

    CogdaLiveDataServerUpdateListener updateListener = new CogdaLiveDataServerUpdateListener(liveDataServer);
   
    DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
    container.setMessageListener(
        new JmsByteArrayMessageDispatcher(
            new ByteArrayFudgeMessageReceiver(updateListener)));
    container.setDestinationName(getListenTopicName());
    container.setPubSubDomain(true);
    container.setConnectionFactory(getListenJmsConnector().getConnectionFactory());
   
    CogdaLiveDataServerMBean mbean = new CogdaLiveDataServerMBean(liveDataServer);
View Full Code Here

   * @param connector  the JMS connector, not null
   */
  public JmsChangeManager(JmsConnector connector) {
    ArgumentChecker.notNull(connector, "connector");
    _jmsConnector = connector.ensureTopicName();
    ByteArrayFudgeMessageReceiver bafmr = new ByteArrayFudgeMessageReceiver(this, OpenGammaFudgeContext.getInstance());
    _messageDispatcher = new JmsByteArrayMessageDispatcher(bafmr);
  }
View Full Code Here

   * @param topicName  the topic name to use, not null
   */
  public JmsChangeManager(JmsConnector connector, String topicName) {
    ArgumentChecker.notNull(connector, "connector");
    _jmsConnector = connector.withTopicName(topicName);
    ByteArrayFudgeMessageReceiver bafmr = new ByteArrayFudgeMessageReceiver(this, OpenGammaFudgeContext.getInstance());
    _messageDispatcher = new JmsByteArrayMessageDispatcher(bafmr);
  }
View Full Code Here

    AnalyticServiceTradeProducer tradeProducer = new AnalyticServiceTradeProducer();
   
    DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
    container.setMessageListener(
        new JmsByteArrayMessageDispatcher(
            new ByteArrayFudgeMessageReceiver(tradeProducer)));
    container.setDestinationName(getListenTopicName());
    container.setPubSubDomain(false);
    container.setConnectionFactory(getListenJmsConnector().getConnectionFactory());
   
    JmsAnalyticsDistributor analyticsDistributor = new JmsAnalyticsDistributor(new DefaultJmsTopicNameResolver(getPositionSource()), OpenGammaFudgeContext.getInstance(), _listenJmsConnector);
View Full Code Here

    jmsConnectorFactoryBean.setName("StandardJms");
    jmsConnectorFactoryBean.setConnectionFactory(jmsConnectionFactory);
    jmsConnectorFactoryBean.setClientBrokerUri(URI.create(activeMQUrl));
   
    JmsConnector jmsConnector = jmsConnectorFactoryBean.getObjectCreating();
    ByteArrayFudgeMessageReceiver fudgeReceiver = new ByteArrayFudgeMessageReceiver(new FudgeMessageReceiver() {
     
      @Override
      public void messageReceived(FudgeContext fudgeContext, FudgeMsgEnvelope msgEnvelope) {
        FudgeMsg message = msgEnvelope.getMessage();
        s_logger.debug("received {}", message);
View Full Code Here

      final Connection connection = getProvider().getJmsConnector().getConnectionFactory().createConnection();
      connection.start();
      final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      final Topic topic = session.createTopic(topicName);
      final MessageConsumer messageConsumer = session.createConsumer(topic);
      messageConsumer.setMessageListener(new JmsByteArrayMessageDispatcher(new ByteArrayFudgeMessageReceiver(listener, getProvider().getFudgeContext())));
      return connection;
    } catch (JMSException e) {
      throw new OpenGammaRuntimeException("Failed to create JMS connection on " + topicName, e);
    }
  }
View Full Code Here

  /**
   * @param topic The topic for {@link MarketDataAvailabilityNotification} messages
   * @param jmsConnector For receiving JMS messages
   */
  public AvailabilityNotificationListener(String topic, JmsConnector jmsConnector) {
    ByteArrayFudgeMessageReceiver receiver = new ByteArrayFudgeMessageReceiver(new Receiver());
    JmsByteArrayMessageDispatcher dispatcher = new JmsByteArrayMessageDispatcher(receiver);
    _jmsTopicContainer = jmsConnector.getTopicContainerFactory().create(topic, dispatcher);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.transport.ByteArrayFudgeMessageReceiver

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.