Examples of LiveDataClient


Examples of com.opengamma.livedata.LiveDataClient

 
  protected LiveDataClient identifyUnderlying(LiveDataSpecification specification) {
    ExternalIdBundle idBundle = specification.getIdentifiers();
   
    for (ExternalId id : idBundle.getExternalIds()) {
      LiveDataClient underlying = _underlyingClients.get(id.getScheme().getName());
      if (underlying != null) {
        s_logger.debug("Delegating {} to {}", specification, underlying);
        return underlying;
      }
    }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

  }
 
  protected Map<LiveDataClient, List<LiveDataSpecification>> splitCollection(Collection<LiveDataSpecification> specifications) {
    Map<LiveDataClient, List<LiveDataSpecification>> result = new HashMap<LiveDataClient, List<LiveDataSpecification>>();
    for (LiveDataSpecification specification : specifications) {
      LiveDataClient underlying = identifyUnderlying(specification);
      List<LiveDataSpecification> perUnderlyingSpecs = result.get(underlying);
      if (perUnderlyingSpecs == null) {
        perUnderlyingSpecs = new LinkedList<LiveDataSpecification>();
        result.put(underlying, perUnderlyingSpecs);
      }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    return result;
  }

  @Override
  public boolean isEntitled(UserPrincipal user, LiveDataSpecification requestedSpecification) {
    LiveDataClient underlying = identifyUnderlying(requestedSpecification);
    return underlying.isEntitled(user, requestedSpecification);
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    return result;
  }

  @Override
  public void subscribe(UserPrincipal user, LiveDataSpecification requestedSpecification, LiveDataListener listener) {
    LiveDataClient underlying = identifyUnderlying(requestedSpecification);
    underlying.subscribe(user, requestedSpecification, listener);
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    }
  }

  @Override
  public void unsubscribe(UserPrincipal user, LiveDataSpecification fullyQualifiedSpecification, LiveDataListener listener) {
    LiveDataClient underlying = identifyUnderlying(fullyQualifiedSpecification);
    underlying.unsubscribe(user, fullyQualifiedSpecification, listener);
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    }
  }

  @Override
  public LiveDataSubscriptionResponse snapshot(UserPrincipal user, LiveDataSpecification requestedSpecification, long timeout) {
    LiveDataClient underlying = identifyUnderlying(requestedSpecification);
    return underlying.snapshot(user, requestedSpecification, timeout);
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    return liveDataClient;
  }

  @Override
  public void destroy() {
    LiveDataClient ldc = getObject();
    if (ldc != null) {
      ldc.close();
    }
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    initNamedMarketDataSpecificationRepository(repo);
  }

  private MarketDataProviderFactory initLiveMarketDataProviderFactory(final ComponentRepository repo) {
    final LiveDataMetaDataProvider provider = getServerMetaDataProvider();
    final LiveDataClient liveDataClient = createLiveDataClient(provider);

    final MarketDataAvailabilityFilter availability = BloombergDataUtils.createAvailabilityFilter();
    final LiveDataFactory defaultFactory = new LiveDataFactory(liveDataClient, availability);
    final Map<String, LiveDataFactory> factoryMap = ImmutableMap.of(BLOOMBERG_LIVE_SOURCE_NAME, defaultFactory);
    final MarketDataProviderFactory marketDataProviderFactory = new InMemoryLKVLiveMarketDataProviderFactory(defaultFactory, factoryMap);
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    final RemoteLiveDataClientFactoryBean ldcFb = new RemoteLiveDataClientFactoryBean();
    ldcFb.setJmsConnector(jmsConnector);
    ldcFb.setSubscriptionTopic(metaData.getJmsSubscriptionTopic());
    ldcFb.setEntitlementTopic(metaData.getJmsEntitlementTopic());
    ldcFb.setHeartbeatTopic(metaData.getJmsHeartbeatTopic());
    final LiveDataClient ldcDistributed = ldcFb.getObjectCreating();
    return ldcDistributed;
  }
View Full Code Here

Examples of com.opengamma.livedata.LiveDataClient

    for (LiveDataMetaDataProvider metaDataProvider : metaDataProviders) {
      MarketDataAvailabilityFilter filter = createMarketDataAvailabilityFilter(metaDataProvider);
      if (filter == null) {
        continue;
      }
      LiveDataClient client = createLiveDataClient(metaDataProvider);
      if (client == null) {
        continue;
      }
      factories.put(metaDataProvider.metaData().getDescription(), new LiveDataFactory(client, filter));
    }
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.