Examples of toFudgeMsg()


Examples of com.opengamma.bbg.model.SecurityMasterRequestMessage.toFudgeMsg()

    RemoteSecurityMasterReceiver receiver = new RemoteSecurityMasterReceiver();
    s_logger.debug("sending getSecurities for {} to remote securityMaster", secKey);
    SecurityMasterRequestMessage requestMessage = new SecurityMasterRequestMessage();
    requestMessage.setMessageType(MessageType.GET_SECURITIES_BY_KEY);
    requestMessage.setSecKey(secKey);
    FudgeMsg fudgeMsg = requestMessage.toFudgeMsg(new FudgeSerializer(_fudgeContext));
    _byteArrayRequestSender.sendRequest(_fudgeContext.toByteArray(fudgeMsg), receiver);
    try {
      receiver.getLatch().await();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
View Full Code Here

Examples of com.opengamma.bbg.model.SecurityMasterRequestMessage.toFudgeMsg()

    RemoteSecurityMasterReceiver receiver = new RemoteSecurityMasterReceiver();
    s_logger.debug("sending getSecurity for {} to remote securityMaster", secKey);
    SecurityMasterRequestMessage requestMessage = new SecurityMasterRequestMessage();
    requestMessage.setMessageType(MessageType.GET_SECURITY_BY_KEY);
    requestMessage.setSecKey(secKey);
    FudgeMsg fudgeMsg = requestMessage.toFudgeMsg(new FudgeSerializer(_fudgeContext));
    _byteArrayRequestSender.sendRequest(_fudgeContext.toByteArray(fudgeMsg), receiver);
    try {
      receiver.getLatch().await();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
View Full Code Here

Examples of com.opengamma.bbg.model.SecurityMasterRequestMessage.toFudgeMsg()

    RemoteSecurityMasterReceiver receiver = new RemoteSecurityMasterReceiver();
    s_logger.debug("sending getSecurity for {} to remote securityMaster", uid);
    SecurityMasterRequestMessage requestMessage = new SecurityMasterRequestMessage();
    requestMessage.setMessageType(MessageType.GET_SECURITY_BY_IDENTITY);
    requestMessage.setUniqueId(uid);
    FudgeMsg fudgeMsg = requestMessage.toFudgeMsg(new FudgeSerializer(_fudgeContext));
    _byteArrayRequestSender.sendRequest(_fudgeContext.toByteArray(fudgeMsg), receiver);
    try {
      receiver.getLatch().await();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
View Full Code Here

Examples of com.opengamma.bbg.model.SecurityMasterRequestMessage.toFudgeMsg()

    RemoteSecurityMasterReceiver receiver = new RemoteSecurityMasterReceiver();
    s_logger.debug("sending getSecurity for {} to remote securityMaster", identifier);
    SecurityMasterRequestMessage requestMessage = new SecurityMasterRequestMessage();
    requestMessage.setMessageType(MessageType.GET_OPTION_CHAIN);
    requestMessage.setSecKey(ExternalIdBundle.of(identifier));
    FudgeMsg fudgeMsg = requestMessage.toFudgeMsg(new FudgeSerializer(_fudgeContext));
    _byteArrayRequestSender.sendRequest(_fudgeContext.toByteArray(fudgeMsg), receiver);
    try {
      receiver.getLatch().await();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
View Full Code Here

Examples of com.opengamma.engine.marketdata.live.MarketDataAvailabilityNotification.toFudgeMsg()

                    ExternalSchemes.BLOOMBERG_TCM,
                    ExternalSchemes.BLOOMBERG_TICKER,
                    ExternalSchemes.BLOOMBERG_TICKER_WEAK));
            FudgeSerializer serializer = new FudgeSerializer(OpenGammaFudgeContext.getInstance());
            s_logger.info("Sending notification that Bloomberg is available: {}", notification);
            _availabilityNotificationSender.send(notification.toFudgeMsg(serializer));
          } catch (Exception e) {
            s_logger.warn("Failed to connect to Bloomberg", e);
          }
        }
      }
View Full Code Here

Examples of com.opengamma.livedata.msg.EntitlementRequest.toFudgeMsg()

  }

  private FudgeMsg composeRequestMessage(UserPrincipal user,
      Collection<LiveDataSpecification> specifications) {
    EntitlementRequest request = new EntitlementRequest(user, specifications);
    return request.toFudgeMsg(new FudgeSerializer(_fudgeContext));
  }

}
View Full Code Here

Examples of com.opengamma.livedata.msg.EntitlementResponse.toFudgeMsg()

        response = new EntitlementResponse(spec, false, entitlementRequest.getUser() + " is not entitled to " + spec);
      }
      responses.add(response);
    }
    EntitlementResponseMsg response = new EntitlementResponseMsg(responses);
    return response.toFudgeMsg(new FudgeSerializer(deserializer.getFudgeContext()));
  }

}
View Full Code Here

Examples of com.opengamma.livedata.msg.EntitlementResponseMsg.toFudgeMsg()

        response = new EntitlementResponse(spec, false, entitlementRequest.getUser() + " is not entitled to " + spec);
      }
      responses.add(response);
    }
    EntitlementResponseMsg response = new EntitlementResponseMsg(responses);
    return response.toFudgeMsg(new FudgeSerializer(deserializer.getFudgeContext()));
  }

}
View Full Code Here

Examples of com.opengamma.livedata.msg.Heartbeat.toFudgeMsg()

  // LiveDataHeartbeat

  @Override
  public Collection<LiveDataSpecification> heartbeat(final Collection<LiveDataSpecification> activeSubscriptions) {
    Heartbeat heartbeat = new Heartbeat(activeSubscriptions);
    FudgeMsg heartbeatMsg = heartbeat.toFudgeMsg(new FudgeSerializer(getMessageSender().getFudgeContext()));
    getMessageSender().send(heartbeatMsg);
    return null;
  }

}
View Full Code Here

Examples of com.opengamma.livedata.msg.LiveDataSubscriptionRequest.toFudgeMsg()

      }
    }
   
    // Build request message
    LiveDataSubscriptionRequest subReqMessage = new LiveDataSubscriptionRequest(user, type, specs);
    FudgeMsg requestMessage = subReqMessage.toFudgeMsg(new FudgeSerializer(getFudgeContext()));
   
    // Build response receiver
    FudgeMessageReceiver responseReceiver;
    if (type == SubscriptionType.SNAPSHOT) {
      responseReceiver = new SnapshotResponseReceiver(subHandles);
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.