Package com.opengamma.transport

Examples of com.opengamma.transport.FudgeMessageSender


    stopCachingReferenceDataProvider(testServer.getReferenceDataProvider());
    testServer.stop();
  }

  public static BloombergLiveDataServer getTestServer(ReferenceDataProvider cachingRefDataProvider) {
    FudgeMessageSender fudgeMessageSender = new FudgeMessageSender() {
      @Override
      public void send(FudgeMsg message) {
        // do nothing
      }
      @Override
View Full Code Here


    ConnectionJob(final Socket socket, final InputStream is, final OutputStream os) {
      _socket = socket;
      _reader = getFudgeContext().createMessageReader(new BufferedInputStream(is));
      _reader.setLazyReads(isLazyFudgeMsgReads());
      _sender = new FudgeMessageSender() {

        private final MessageBatchingWriter _writer = new MessageBatchingWriter(getFudgeContext(),
            new StrictBufferedOutputStream(os));

        @Override
View Full Code Here

  @Override
  protected StandardLiveDataServer initServer(ComponentRepository repo) {
    // real server
    JmsByteArrayMessageSender jmsSender = new JmsByteArrayMessageSender(getJmsMarketDataAvailabilityTopic(),
                                                                        getJmsConnector().getJmsTemplateTopic());
    FudgeMessageSender availabilityNotificationSender = new ByteArrayFudgeMessageSender(jmsSender);
    BloombergConnector bloombergConnector = getBloombergConnector();
    ReferenceDataProvider referenceDataProvider = getReferenceDataProvider();
    CacheManager cacheManager = getCacheManager();
    BloombergLiveDataServer realServer = createBloombergLiveDataServer(bloombergConnector, referenceDataProvider, cacheManager, availabilityNotificationSender);
    if (getSubscriptionTickerLimit() != null) {
View Full Code Here

  public void testBasicBehaviour () {
    final AtomicInteger messages = new AtomicInteger ();
    final FunctionInvocationStatisticsSender sender = new FunctionInvocationStatisticsSender ();
    final FunctionInvocationStatisticsReceiver receiver = new FunctionInvocationStatisticsReceiver (_cost);
    sender.setExecutorService(Executors.newCachedThreadPool ());
    sender.setFudgeMessageSender(new FudgeMessageSender () {

      @Override
      public FudgeContext getFudgeContext() {
        return FudgeContext.GLOBAL_DEFAULT;
      }
View Full Code Here

  protected FunctionInvocationStatisticsSender getStatistics() {
    return _statistics;
  }

  private void sendMessage(final RemoteCalcNodeMessage message) {
    final FudgeMessageSender sender = getConnection().getFudgeMessageSender();
    final FudgeSerializer serializer = new FudgeSerializer(sender.getFudgeContext());
    final FudgeMsg msg = FudgeSerializer.addClassHeader(serializer.objectToFudgeMsg(message), message.getClass(), RemoteCalcNodeMessage.class);
    s_logger.debug("Sending message ({} fields) to {}", msg.getNumFields(), _connection);
    sender.send(msg);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.transport.FudgeMessageSender

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.