com.devexperts.qd
Interface SubscriptionFilter

All Known Subinterfaces:
StableSubscriptionFilter
All Known Implementing Classes:
IPFSymbolFilter, PatternFilter, RecordOnlyFilter

public interface SubscriptionFilter

The SubscriptionFilter is used to block unwanted subscription. Its main purpose is to control subscription and corresponding data flows in a situation with multiple providers and consumers. For example, it allows to block sending local data subscription to remote data provider or to block remote data consumers from subscribing to local data.

The SubscriptionFilter must be stable - it must return the same result for the same record no matter of external circumstances, otherwise the behavior of QD components is unspecified.

The SubscriptionFilter imposes the same performance restrictions as other visiting interfaces - the implementor of SubscriptionFilter must perform its operations quickly without need for synchronization and prolonged external actions.

As a general rule wildcard subscription should always be accepted (when the corresponding record is allowed at all), however filtering wildcard subscription is actually allowed (you can install filters to decide which agents or distributors are allowed to use wildcard subscription).


Method Summary
 boolean acceptRecord(DataRecord record, int cipher, java.lang.String symbol)
          Determines if specified record shall be processed by corresponding subsystem.
 

Method Detail

acceptRecord

boolean acceptRecord(DataRecord record,
                     int cipher,
                     java.lang.String symbol)
Determines if specified record shall be processed by corresponding subsystem.

Returns:
true if the record should be processed; false if it should be ignored.