Package org.fudgemsg

Examples of org.fudgemsg.MutableFudgeMsg


    /** The payment lag field */
    private static final String PAYMENT_LAG_FIELD = "paymentLag";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final VanillaIborLegConvention object) {
      final MutableFudgeMsg message = serializer.newMessage();
      FudgeSerializer.addClassHeader(message, VanillaIborLegConvention.class);
      serializer.addToMessage(message, IBOR_INDEX_CONVENTION_FIELD, null, object.getIborIndexConvention());
      message.add(ADVANCE_FIXING_FIELD, object.isIsAdvanceFixing());
      message.add(STUB_TYPE_FIELD, object.getStubType().name());
      message.add(INTERPOLATOR_NAME_FIELD, object.getInterpolationMethod());
      message.add(NAME_FIELD, object.getName());
      message.add(RESET_TENOR_FIELD, object.getResetTenor().getPeriod().toString());
      message.add(IS_EOM_FIELD, object.isIsEOM());
      message.add(SETTLEMENT_DAYS_FIELD, object.getSettlementDays());
      message.add(EXCHANGE_NOTIONAL_FIELD, object.isIsExchangeNotional());
      message.add(PAYMENT_LAG_FIELD, object.getPaymentLag());
      serializer.addToMessage(message, EXTERNAL_ID_BUNDLE_FIELD, null, object.getExternalIdBundle());
      serializer.addToMessage(message, UNIQUE_ID_FIELD, null, object.getUniqueId());
      return message;
    }
View Full Code Here


    /** The rate field name */
    private static final String RATE_FIELD_NAME = "rate";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final FixedInflationSwapLeg object) {
      final MutableFudgeMsg msg = serializer.newMessage();
      toFudgeMsg(serializer, object, msg);
      addToMessage(msg, RATE_FIELD_NAME, object.getRate());
      return msg;
    }
View Full Code Here

    /** The interpolation method field name */
    private static final String INTERPOLATION_METHOD_FIELD_NAME = "interpolationMethod";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final InflationIndexSwapLeg object) {
      final MutableFudgeMsg msg = serializer.newMessage();
      toFudgeMsg(serializer, object, msg);
      addToMessage(msg, INDEX_ID_FIELD_NAME, ExternalIdFudgeBuilder.toFudgeMsg(serializer, object.getIndexId()));
      addToMessage(msg, QUOTATION_LAG_FIELD_NAME, object.getQuotationIndexationLag());
      addToMessage(msg, CONVENTIONAL_LAG_FIELD_NAME, object.getConventionalIndexationLag());
      addToMessage(msg, INTERPOLATION_METHOD_FIELD_NAME, object.getInterpolationMethod().name());
View Full Code Here

    /** The convention field */
    private static final String CONVENTION_ID_FIELD = "convention";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final FRANode object) {
      final MutableFudgeMsg message = serializer.newMessage();
      message.add(null, 0, object.getClass().getName());
      message.add(FIXING_START_FIELD, object.getFixingStart().getPeriod().toString());
      message.add(FIXING_END_FIELD, object.getFixingEnd().getPeriod().toString());
      message.add(CONVENTION_ID_FIELD, object.getConvention());
      message.add(CURVE_MAPPER_ID_FIELD, object.getCurveNodeIdMapperName());
      if (object.getName() != null) {
        message.add(NAME_FIELD, object.getName());
      }
      return message;
    }
View Full Code Here

  public static final String VALUE_FIELD_NAME = "Value";

  //-------------------------------------------------------------------------
  @Override
  public MutableFudgeMsg buildMessage(FudgeSerializer serializer, ObjectId object) {
    final MutableFudgeMsg msg = serializer.newMessage();
    toFudgeMsg(serializer, object, msg);
    return msg;
  }
View Full Code Here

  public static MutableFudgeMsg toFudgeMsg(final FudgeSerializer serializer, final ObjectId object) {
    if (object == null) {
      return null;
    }
    final MutableFudgeMsg msg = serializer.newMessage();
    toFudgeMsg(serializer, object, msg);
    return msg;
  }
View Full Code Here

    /** The receive currency field */
    private static final String RECEIVE_CURRENCY_FIELD = "receiveCurrency";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final FXForwardNode object) {
      final MutableFudgeMsg message = serializer.newMessage();
      message.add(null, 0, object.getClass().getName());
      message.add(START_TENOR_FIELD, object.getStartTenor().getPeriod().toString());
      message.add(MATURITY_TENOR_FIELD, object.getMaturityTenor().getPeriod().toString());
      message.add(CONVENTION_FIELD, object.getFxForwardConvention());
      message.add(PAY_CURRENCY_FIELD, object.getPayCurrency().getCode());
      message.add(RECEIVE_CURRENCY_FIELD, object.getReceiveCurrency().getCode());
      message.add(CURVE_MAPPER_ID_FIELD, object.getCurveNodeIdMapperName());
      if (object.getName() != null) {
        message.add(NAME_FIELD, object.getName());
      }
      return message;
    }
View Full Code Here

    /** The underlying convention field */
    private static final String UNDERLYING_CONVENTION_FIELD = "underlyingConvention";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final RateFutureNode object) {
      final MutableFudgeMsg message = serializer.newMessage();
      message.add(null, 0, object.getClass().getName());
      message.add(FUTURE_NUMBER_FIELD, object.getFutureNumber());
      message.add(START_TENOR_FIELD, object.getStartTenor().getPeriod().toString());
      message.add(FUTURE_TENOR_FIELD, object.getFutureTenor().getPeriod().toString());
      message.add(UNDERLYING_TENOR_FIELD, object.getUnderlyingTenor().getPeriod().toString());
      message.add(FUTURE_CONVENTION_FIELD, object.getFutureConvention());
      message.add(UNDERLYING_CONVENTION_FIELD, object.getUnderlyingConvention());
      message.add(CURVE_MAPPER_ID_FIELD, object.getCurveNodeIdMapperName());
      if (object.getName() != null) {
        message.add(NAME_FIELD, object.getName());
      }
      return message;
    }
View Full Code Here

    /** The use fixings field */
    private static final String USE_FIXINGS_FIELD = "useFixings";

    @Override
    public MutableFudgeMsg buildMessage(final FudgeSerializer serializer, final SwapNode object) {
      final MutableFudgeMsg message = serializer.newMessage();
      message.add(null, 0, object.getClass().getName());
      message.add(START_TENOR_FIELD, object.getStartTenor().getPeriod().toString());
      message.add(MATURITY_TENOR_FIELD, object.getMaturityTenor().getPeriod().toString());
      message.add(PAY_LEG_CONVENTION_FIELD, object.getPayLegConvention());
      message.add(RECEIVE_LEG_CONVENTION_FIELD, object.getReceiveLegConvention());
      message.add(CURVE_MAPPER_ID_FIELD, object.getCurveNodeIdMapperName());
      if (object.getName() != null) {
        message.add(NAME_FIELD, object.getName());
      }
      message.add(USE_FIXINGS_FIELD, object.isUseFixings());
      return message;
    }
View Full Code Here

  public static final String VERSION_FIELD_NAME = "Version";

  //-------------------------------------------------------------------------
  @Override
  public MutableFudgeMsg buildMessage(FudgeSerializer serializer, UniqueId object) {
    final MutableFudgeMsg msg = serializer.newMessage();
    toFudgeMsg(serializer, object, msg);
    return msg;
  }
View Full Code Here

TOP

Related Classes of org.fudgemsg.MutableFudgeMsg

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.