public class MetalSubjectInfo extends AbstractSubjectInfo
A domain object representing a subscription to streaming rates for precious metals, such as XAUUSD.
You do not need to construct instances of this class yourself. They are generated from incoming requests by the
MetalSubjectParser
and passed to your implementation of CachedDataProvider.onRequest(SubjectInfo)
.
Constructor and Description |
---|
MetalSubjectInfo(String subject,
String baseCurrency,
String termCurrency,
String unit,
String tenor,
String amount,
String marginBand)
Creates an instance of MetalSubjectInfo with the default subject prefix "PM" and
the provided parameters.
|
MetalSubjectInfo(String subject,
String subjectPrefix,
String baseCurrency,
String termCurrency,
String unit,
String tenor,
String amount,
String marginBand)
Creates an instance of MetalSubjectInfo with a specified subject prefix and the provided parameters
.
|
Modifier and Type | Method and Description |
---|---|
String |
getUnit()
A proxy method that calls the underlying method
AbstractSubjectInfo.getAmountIn() . |
boolean |
isMetal()
Returns true.
|
equals, getAmount, getAmountIn, getBaseCurrency, getBrokenDate, getCurrencyPair, getMarginBand, getSubject, getSubjectPrefix, getTenor, getTermCurrency, hashCode, toString
public MetalSubjectInfo(String subject, String baseCurrency, String termCurrency, String unit, String tenor, String amount, String marginBand)
subject
- The full subject.baseCurrency
- The first currency in the pair. This is usually the currency code for the metal, such as
XAU or XAG.termCurrency
- The second currency in the pair. This is usually the currency, such as USD.unit
- The unit that the amount is specified in such, as OZT (Troy ounces) or kilos.tenor
- The tenor for the subscription.amount
- The amount, specified in a quantity of the metal unit.marginBand
- The margin band or price tier for the subscription.public MetalSubjectInfo(String subject, String subjectPrefix, String baseCurrency, String termCurrency, String unit, String tenor, String amount, String marginBand)
Creates an instance of MetalSubjectInfo with a specified subject prefix and the provided parameters .
Calling this constructor is not recommended unless you are aware of all the client-side and configuration modifications required to support changing the expected format for subscription requests.
subject
- The full subject.subjectPrefix
- The subject prefix. This will be used instead of the default prefix "PM".baseCurrency
- The first currency in the pair. This is usually the currency code for the metal, such as
XAU or XAG.termCurrency
- The second currency in the pair. This is usually the currency, such as USD.unit
- The unit that the amount is specified in such, as OZT (Troy ounces) or kilos.tenor
- The tenor for the subscription.amount
- The amount, specified in a quantity of the metal unit.marginBand
- The margin band or price tier for the subscription.public boolean isMetal()
isMetal
in class AbstractSubjectInfo
public String getUnit()
AbstractSubjectInfo.getAmountIn()
.Copyright © 2015 Caplin Systems.