Package com.opengamma.transport.jms

Examples of com.opengamma.transport.jms.JmsByteArrayMessageDispatcher


   
    _factory = new JmsSenderFactory(jmsConnector);
    _mdd = MarketDataDistributorTest.getTestDistributor(_factory);
   
    _collectingReceiver = new CollectingByteArrayMessageReceiver();
    JmsByteArrayMessageDispatcher messageDispatcher = new JmsByteArrayMessageDispatcher(_collectingReceiver);
   
    _container = new DefaultMessageListenerContainer();
    _container.setConnectionFactory(jmsConnector.getConnectionFactory());
    _container.setMessageListener(messageDispatcher);
    _container.setDestinationName(_mdd.getDistributionSpec().getJmsTopic());
View Full Code Here


          } catch (Throwable t) {
            s_logger.error("Error dispatching " + listenerCall + " to listener", t);
          }
        }
      }, _fudgeContext);
      _queueHost = new JmsTemporaryQueueHost(_jmsConnector, new JmsByteArrayMessageDispatcher(bafmr));

      s_logger.info("Set up result JMS subscription to {}", _queueHost.getQueueName());
      return _queueHost.getQueueName();
    } catch (JMSException e) {
      s_logger.error("Exception setting up JMS result listener", e);
View Full Code Here

      @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());
   
View Full Code Here

   * @param repo the repository, not null
   * @param server the server, not null
   */
  protected void publishJmsHeartbeat(ComponentRepository repo, StandardLiveDataServer server) {
    HeartbeatReceiver receiver = new HeartbeatReceiver(server.getExpirationManager());
    JmsByteArrayMessageDispatcher jmsDispatcher = new JmsByteArrayMessageDispatcher(receiver);
    JmsTopicContainer jmsContainer = getJmsConnector().getTopicContainerFactory().create(getJmsHeartbeatTopic(), jmsDispatcher);
    repo.registerLifecycle(jmsContainer);
  }
View Full Code Here

   */
  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

   */
  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());
   
View Full Code Here

      public void messageReceived(FudgeContext fudgeContext, FudgeMsgEnvelope msgEnvelope) {
        FudgeMsg message = msgEnvelope.getMessage();
        s_logger.debug("received {}", message);
      }
    }, s_fudgeContext);
    final JmsByteArrayMessageDispatcher jmsDispatcher = new JmsByteArrayMessageDispatcher(fudgeReceiver);
   
    Connection connection = jmsConnector.getConnectionFactory().createConnection();
    connection.start();
   
    pushTrade("ARG", connection, destinationName, jmsConnector, jmsDispatcher);
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

TOP

Related Classes of com.opengamma.transport.jms.JmsByteArrayMessageDispatcher

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.