public class MetalSubjectParser extends AbstractSubjectParser<MetalSubjectInfo>
SubjectParser
that parses subscription parameters into a domain
object representing a subscription to streaming rates for precious metals.subjectPattern
Constructor and Description |
---|
MetalSubjectParser()
Creates a MetalSubjectParser with the default metal subject prefix "/PM".
|
MetalSubjectParser(String extraSubjectPrefix)
Creates a MetalSubjectParser with the default prefix "PM" plus an extra part
of the subject prefix.
|
Modifier and Type | Method and Description |
---|---|
protected MetalSubjectInfo |
createSubjectInfo(String subject,
String subjectPrefix,
String baseCurrency,
String termCurrency,
String amountIn,
String tenor,
String amount,
String marginBand)
Creates an instance of the subclass of
AbstractSubjectInfo that this class has been genericised with. |
com.caplin.datasource.namespace.Namespace |
getNamespace()
Returns the namespace handled by the subject parser.
|
getSubjectRegex, parse, validate
public MetalSubjectParser()
public MetalSubjectParser(String extraSubjectPrefix)
extraSubjectPrefix
- An extra string to append to the default prefix. For example, if you pass in "EXCHANGE1" then the
subject prefix for MetalSubjectInfo
objects created by this parser will be set to "PM/EXCHANGE1".protected MetalSubjectInfo createSubjectInfo(String subject, String subjectPrefix, String baseCurrency, String termCurrency, String amountIn, String tenor, String amount, String marginBand)
AbstractSubjectParser
AbstractSubjectInfo
that this class has been genericised with.createSubjectInfo
in class AbstractSubjectParser<MetalSubjectInfo>
subject
- The full subject.subjectPrefix
- A string prefix, e.g "/FX".baseCurrency
- The first currency in the pair.termCurrency
- The second currency in the pair.amountIn
- The unit that the amount is specified in. This could be the dealt currency for an instance
of FXSubjectInfo
or a unit such as OZT or Kilos for MetalSubjectInfo
,
for example.tenor
- The tenor for the subject info.amount
- The amount for the subject info, specified in the unit defined by the amountIn
parameter.marginBand
- The margin band for the subject info, sometimes referred to as the price tier.AbstractSubjectInfo
that this class has been genericised with.public com.caplin.datasource.namespace.Namespace getNamespace()
SubjectParser
Copyright © 2015 Caplin Systems.