Interface ObservableDataProvider
-
public interface ObservableDataProvider
A provider of observable market data.This plugin point allows a market data supplier to be provided. Implementations might request data from an external data provider, such as Bloomberg or Reuters.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ObservableDataProvider
none()
Obtains an instance that provides no market data.Map<ObservableId,Result<Double>>
provideObservableData(Set<? extends ObservableId> identifiers)
Provides market data for the specified identifiers.
-
-
-
Method Detail
-
none
static ObservableDataProvider none()
Obtains an instance that provides no market data.When invoked, the provider will return a map where every requested identifier is a failure.
- Returns:
- a provider that returns failures if invoked
-
provideObservableData
Map<ObservableId,Result<Double>> provideObservableData(Set<? extends ObservableId> identifiers)
Provides market data for the specified identifiers.The implementation will provide market data for each identifier. If market data cannot be obtained for an identifier, a failure will be returned. The returned map must contain one entry for each identifier that was requested.
- Parameters:
identifiers
- the market data identifiers to find- Returns:
- the map of market data values, keyed by identifier
-
-