Examples of accept()


Examples of com.opengamma.engine.calcnode.msg.RemoteCalcNodeMessage.accept()

  @Override
  public void connectionReceived(final FudgeContext fudgeContext, final FudgeMsgEnvelope message, final FudgeConnection connection) {
    final FudgeDeserializer deserializer = new FudgeDeserializer(fudgeContext);
    final RemoteCalcNodeMessage remoteCalcNodeMessage = deserializer.fudgeMsgToObject(RemoteCalcNodeMessage.class, message.getMessage());
    remoteCalcNodeMessage.accept(new RemoteCalcNodeMessageVisitor() {

      @Override
      protected void visitUnexpectedMessage(final RemoteCalcNodeMessage message) {
        s_logger.warn("Unexpected message {}", message);
      }
View Full Code Here

Examples of com.opengamma.engine.target.ComputationTargetReference.accept()

      final ComputationTargetReference targetSpec = valueRequirement.getTargetReference();
      // Only shift equities
      if (targetSpec.getType().isTargetType(ComputationTargetType.SECURITY) || !MarketDataRequirementNames.MARKET_VALUE.equals(valueRequirement.getValueName())) {
        return value;
      }
      final ExternalIdBundle bundle = targetSpec.accept(new ComputationTargetReferenceVisitor<ExternalIdBundle>() {

        @Override
        public ExternalIdBundle visitComputationTargetRequirement(final ComputationTargetRequirement requirement) {
          return requirement.getIdentifiers();
        }
View Full Code Here

Examples of com.opengamma.engine.target.ComputationTargetType.accept()

  };

  public static ComputationTargetReference buildObjectImpl(final FudgeDeserializer deserializer, final FudgeMsg message) {
    ComputationTargetType type = ComputationTargetTypeFudgeBuilder.buildObjectImpl(message);
    final List<ComputationTargetType> types = type.accept(s_getNestedType, null);
    if (types == null) {
      if (message.getByName(IDENTIFIER_FIELD_NAME) == null) {
        return ComputationTargetSpecification.NULL;
      } else {
        return new ComputationTargetRequirement(type, ExternalIdBundle.EMPTY);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.CashNode.accept()

  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullCashConvention() {
    final CashNode node = new CashNode(Tenor.ONE_DAY, Tenor.ONE_WEEK, DEPOSIT_1M_ID, SCHEME);
    node.accept(EMPTY_CONVENTIONS);
  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullFRAConvention() {
    final FRANode node = new FRANode(Tenor.ONE_DAY, Tenor.THREE_MONTHS, LIBOR_3M_ID, SCHEME);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.ContinuouslyCompoundedRateNode.accept()

  }

  @Test
  public void testContinuouslyCompoundedRateNode() {
    final ContinuouslyCompoundedRateNode node = new ContinuouslyCompoundedRateNode(SCHEME, Tenor.TWELVE_MONTHS);
    assertNull(node.accept(VISITOR));
  }

  @Test
  public void testCreditSpreadNode() {
    final CreditSpreadNode node = new CreditSpreadNode(SCHEME, Tenor.THREE_MONTHS);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.CreditSpreadNode.accept()

  }

  @Test
  public void testCreditSpreadNode() {
    final CreditSpreadNode node = new CreditSpreadNode(SCHEME, Tenor.THREE_MONTHS);
    assertNull(node.accept(VISITOR));
  }

  @Test
  public void testDiscountFactorNode() {
    final DiscountFactorNode node = new DiscountFactorNode(SCHEME, Tenor.FIVE_YEARS);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.CurveNode.accept()

    final SnapshotDataBundle marketValues = new SnapshotDataBundle();
    marketValues.setDataPoint(marketDataId, rate);
    final ZonedDateTime now = DateUtils.getUTCDate(2013, 5, 1);
    final CurveNode cashNode = new CashNode(Tenor.of(Period.ZERO), Tenor.ONE_DAY, DEPOSIT_1D_ID, "Mapper");
    final CurveNodeVisitor<InstrumentDefinition<?>> converter = new CashNodeConverter(CONVENTION_SOURCE, HOLIDAY_SOURCE, REGION_SOURCE, marketValues, marketDataId, now);
    final InstrumentDefinition<?> definition = cashNode.accept(converter);
    assertTrue(definition instanceof CashDefinition);
    final CashDefinition cash = (CashDefinition) definition;
    final CashDefinition expectedCash = new CashDefinition(Currency.USD, DateUtils.getUTCDate(2013, 5, 1), DateUtils.getUTCDate(2013, 5, 2), 1, rate, 1. / 360);
    assertEquals(expectedCash, cash);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.DeliverableSwapFutureNode.accept()

    final double price = 0.99;
    final SnapshotDataBundle marketValues = new SnapshotDataBundle();
    marketValues.setDataPoint(marketDataId, rate);
    final DeliverableSwapFutureNode futureNode = new DeliverableSwapFutureNode(1, Tenor.of(Period.ZERO), Tenor.THREE_MONTHS, Tenor.TEN_YEARS, DELIVERABLE_SWAP_FUTURE_ID, FIXED_IBOR_3M_SWAP_ID, "Mapper");
    final CurveNodeVisitor<InstrumentDefinition<?>> converter = new DeliverableSwapFutureNodeConverter(CONVENTION_SOURCE, HOLIDAY_SOURCE, REGION_SOURCE, marketValues, marketDataId, NOW);
    final InstrumentDefinition<?> definition = futureNode.accept(converter);
    final Currency currency = Currency.USD;
    final DayCount dayCount = THIRTY_360;
    final BusinessDayConvention businessDayConvention = MODIFIED_FOLLOWING;
    final boolean eom = false;
    final Period indexTenor = Period.ofMonths(3);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.DiscountFactorNode.accept()

  }

  @Test
  public void testDiscountFactorNode() {
    final DiscountFactorNode node = new DiscountFactorNode(SCHEME, Tenor.FIVE_YEARS);
    assertNull(node.accept(VISITOR));
  }

  @Test
  public void testFRANode() {
    final FRANode node = new FRANode(Tenor.ONE_DAY, Tenor.THREE_MONTHS, LIBOR_3M_ID, SCHEME);
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.FRANode.accept()

  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullFRAConvention() {
    final FRANode node = new FRANode(Tenor.ONE_DAY, Tenor.THREE_MONTHS, LIBOR_3M_ID, SCHEME);
    node.accept(EMPTY_CONVENTIONS);
  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullRateFutureConvention() {
    final RateFutureNode node = new RateFutureNode(2, Tenor.ONE_DAY, Tenor.THREE_MONTHS, Tenor.THREE_MONTHS, RATE_FUTURE_3M_ID, LIBOR_3M_ID, SCHEME);
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.