Interface Namespace

All Known Implementing Classes:
PrefixNamespace, RegexNamespace

public interface Namespace

A 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:

 

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

    Modifier and Type
    Method
    Description
    boolean
    match(String subject)
    Tests a String to see if it falls within this Namespace.
  • Method Details

    • match

      boolean match(String subject)

      Tests a String to see if it falls within this Namespace.

      Parameters:
      subject - The string to be tested for matching.
      Returns:
      true if subject falls within this Namespace, false otherwise.