Package org.fudgemsg

Examples of org.fudgemsg.FudgeContext.newMessage()


    MutableFudgeMsg msg1 = context.newMessage();
    msg1.add("name1", 1);
    msg1.add("name2", 1);
    msg1.add("name3", 1);
    msg1.add("name1", 1);
    MutableFudgeMsg msg2 = context.newMessage();
    msg1.add("name4", msg2);
    msg2.add(14, 1);
    msg2.add("name5", "foo");
   
    gatheringSender.send(msg1);
View Full Code Here


   * @param type  the bean type to build, not null
   * @return the bean, not null
   */
  public static <T> T decodeQueryParams(UriInfo uriInfo, Class<T> type) {
    FudgeContext context = OpenGammaFudgeContext.getInstance();
    MutableFudgeMsg msg = context.newMessage();
    for (Entry<String, List<String>> entry : uriInfo.getQueryParameters().entrySet()) {
      String key = entry.getKey();
      List<String> values = entry.getValue();
      for (String value : values) {
        decode(msg, key, value);
View Full Code Here

   *
   * @return the raw security instance, not null
   */
  public RawSecurity toRawSecurity() {
    final FudgeContext context = OpenGammaFudgeContext.getInstance();
    final MutableFudgeMsg fudgeMsg = context.newMessage();
    final FudgeSerializer serializer = new FudgeSerializer(context);
    populateFudgeMsg(serializer, fudgeMsg);
    final RawSecurity security = new RawSecurity(getUniqueId(), getName(), getSecurityType(), getExternalIdBundle(), context.toByteArray(fudgeMsg));
    security.setAttributes(getAttributes());
    return security;
View Full Code Here

   */
  @Test
  public void roundTrip() {
    FudgeContext context = OpenGammaFudgeContext.getInstance();
    CurrencyPair eurUsd = CurrencyPair.parse("EUR/USD");
    MutableFudgeMsg msg = context.newMessage();
    msg.add(CURRENCY_PAIR, eurUsd);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    FudgeMsgWriter writer = context.createMessageWriter(baos);
    writer.writeMessage(msg);
    writer.close();
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.