Package com.opengamma.id

Examples of com.opengamma.id.ExternalScheme


  }

  //-------------------------------------------------------------------------
  @Test(enabled=false)
  public void persistentSubscriptionManagement() {
    ExternalScheme idScheme = ExternalScheme.of("TestDomain");
    MockLiveDataServer server = new MockLiveDataServer(idScheme, _cacheManager);
    server.connect();
   
    MongoConnector connector = MongoTestUtils.makeTestConnector(MongoDBPersistentSubscriptionManagerTest.class.getSimpleName(), true);
    MongoDBPersistentSubscriptionManager manager = new MongoDBPersistentSubscriptionManager(server, connector);
View Full Code Here


    EHCacheUtils.shutdownQuiet(_cacheManager);
  }

  //-------------------------------------------------------------------------
  public void expirationWithHeartbeatSendingClient() throws InterruptedException {
    ExternalScheme identificationDomain = ExternalScheme.of("BbgId");

    MockLiveDataServer dataServer = new MockLiveDataServer(identificationDomain, _cacheManager);
    dataServer.connect();
    ExpirationManager expirationManager = dataServer.getExpirationManager();
    // Set expiration timeout artificially low
View Full Code Here

    assertEquals(dataServer.getActualSubscriptions().get(0), subscription.getIdentifier(identificationDomain));
    assertEquals(dataServer.getActualSubscriptions().get(0), subscription.getIdentifier(identificationDomain));
  }

  public void expirationWithClientThatDoesNotSendHeartbeats() throws InterruptedException {
    ExternalScheme identificationDomain = ExternalScheme.of("BbgId");

    MockLiveDataServer dataServer = new MockLiveDataServer(identificationDomain, _cacheManager);
    dataServer.connect();
    ExpirationManager expirationManager = dataServer.getExpirationManager();
View Full Code Here

    assertEquals(dataServer.getActualUnsubscriptions().get(0), subscription.getIdentifier(identificationDomain));
  }

  public void heartbeatWhenNoSubscriptionCreatesNewSubscription() throws InterruptedException {

    ExternalScheme identificationDomain = ExternalScheme.of("BbgId");

    MockLiveDataServer dataServer = new MockLiveDataServer(identificationDomain, _cacheManager);
    dataServer.connect();
    ExpirationManager expirationManager = dataServer.getExpirationManager();
    // Set expiration timeout artificially low
View Full Code Here

  @Override
  public SyntheticIdentifierCurveInstrumentProvider buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final Currency ccy = Currency.of(message.getString(CURRENCY_FIELD));
    final StripInstrumentType stripType = StripInstrumentType.valueOf(message.getString(STRIP_TYPE_FIELD));
    final ExternalScheme scheme = ExternalScheme.of(message.getString(SCHEME_FIELD));
    if (message.hasField(DATA_FIELD) && message.hasField(TYPE_FIELD)) {
      final String dataField = message.getString(DATA_FIELD);
      final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
      return new SyntheticIdentifierCurveInstrumentProvider(ccy, stripType, scheme, dataField, fieldType);
    }
View Full Code Here

  private DistributionSpecification wrap(DistributionSpecification underResolved) {
    if (underResolved == null) {
      return null;
    }
    ExternalId identifier = underResolved.getMarketDataId();
    ExternalScheme wrappedScheme;
    if (identifier.getScheme().equals(ExternalSchemes.BLOOMBERG_BUID)) {
      wrappedScheme = ExternalSchemes.BLOOMBERG_BUID_WEAK;
    } else if (identifier.getScheme().equals(ExternalSchemes.BLOOMBERG_TICKER)) {
      wrappedScheme = ExternalSchemes.BLOOMBERG_TICKER_WEAK;     
    } else {
View Full Code Here

  }

  @ManagedAttribute(description = "The unique id domain of the underlying server.")
  public String getUniqueIdDomain() {
    try {
      ExternalScheme uniqueIdDomain = getServer().getUniqueIdDomain();
      return uniqueIdDomain == null ? "<null>" : uniqueIdDomain.toString();
    } catch (RuntimeException e) {
      s_logger.error("getUniqueIdDomain() failed", e);
      throw new RuntimeException(e.getMessage());
    }
  }
View Full Code Here

      }
    } else {
      ids = null;
    }

    ExternalScheme idMatchScheme;
    if (msg.hasField(ID_MATCH_SCHEME)) {
      String idMatchSchemeStr = deserializer.fieldValueToObject(String.class, msg.getByName(ID_MATCH_SCHEME));
      idMatchScheme = ExternalScheme.of(idMatchSchemeStr);
    } else {
      idMatchScheme = null;
    }

    Pattern idMatchPattern;
    if (msg.hasField(ID_MATCH_PATTERN)) {
      String idMatchPatternStr = deserializer.fieldValueToObject(String.class, msg.getByName(ID_MATCH_PATTERN));
      idMatchPattern = Pattern.compile(idMatchPatternStr);
    } else {
      idMatchPattern = null;
    }

    ExternalScheme idLikeScheme;
    if (msg.hasField(ID_LIKE_SCHEME)) {
      String idLikeSchemeStr = deserializer.fieldValueToObject(String.class, msg.getByName(ID_LIKE_SCHEME));
      idLikeScheme = ExternalScheme.of(idLikeSchemeStr);
    } else {
      idLikeScheme = null;
View Full Code Here

    return configurations;
  }

  public static Map<Currency, CurveSpecificationBuilderConfiguration> buildSyntheticCurveSpecificationBuilderConfigurations() {
    final Map<Currency, CurveSpecificationBuilderConfiguration> configurations = new HashMap<>();
    final ExternalScheme scheme = ExternalSchemes.OG_SYNTHETIC_TICKER;
    configurations.put(Currency.EUR, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.EUR, scheme, "ER"));
    configurations.put(Currency.DKK, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.DKK, scheme));
    configurations.put(Currency.DEM, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.DEM, scheme));
    configurations.put(Currency.CZK, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.CZK, scheme));
    configurations.put(Currency.CAD, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.CAD, scheme));
View Full Code Here

    configurations.put(Currency.CHF, buildSyntheticCurveSpecificationBuilderConfiguration(Currency.CHF, scheme));
    return configurations;
  }

  public static CurveSpecificationBuilderConfiguration buildSyntheticAUD3MCurveSpecification() {
    final ExternalScheme scheme = ExternalSchemes.OG_SYNTHETIC_TICKER;
    final Tenor[] tenors = new Tenor[] {Tenor.ONE_YEAR, Tenor.TWO_YEARS, Tenor.THREE_YEARS, Tenor.FOUR_YEARS, Tenor.FIVE_YEARS, Tenor.ofYears(6), Tenor.ofYears(7), Tenor.ofYears(8), Tenor.ofYears(9),
        Tenor.ofYears(10), Tenor.ofYears(11), Tenor.ofYears(12), Tenor.ofYears(15), Tenor.ofYears(20), Tenor.ofYears(25), Tenor.ofYears(30), Tenor.ofYears(40), Tenor.ofYears(50), Tenor.ofYears(80)};
    final Map<Tenor, CurveInstrumentProvider> fraInstrumentProviders = new HashMap<>();
    final Map<Tenor, CurveInstrumentProvider> swapInstrumentProviders = new HashMap<>();
    final Map<Tenor, CurveInstrumentProvider> basisSwapInstrumentProviders = new HashMap<>();
View Full Code Here

TOP

Related Classes of com.opengamma.id.ExternalScheme

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.