Interface Namespace
- All Known Implementing Classes:
PrefixNamespace,RegexNamespace
Namespace is used to determine if a subject is of interest to an
DataProvider.
A subject name is defined within a DataSource namespace. For example, if the DataSource namespace is the
prefix "/FX" the subject name "/FX/EURUSD" is within that namespace, but "/FY/EURUSD" is not. Namespace
is the interface that represents a DataSource namespace.
A Namespace is used to construct a Publisher and to ensure
that the associated DataProvider only receives requests for subjects that it
can supply.
DataSource for Java includes the following implementations of NameSpace:
PrefixNamespace, which matches the start of a subject name.RegexNamespace, for more complex subject matching requirements.
In particular, the RegexNamespace provides a flexible way to match
subjects against inclusion and exclusion patterns, so you should not normally need to use Namespace
directly. However, should the supplied DataSource namespace implementations not match your requirements you can write
your own custom subject matching logic in an implementation of Namespace.
-
Method Summary
-
Method Details
-
match
Tests aStringto see if it falls within thisNamespace.- Parameters:
subject- Thestringto be tested for matching.- Returns:
trueifsubjectfalls within thisNamespace,falseotherwise.
-