Class FeedFilter

  • All Implemented Interfaces:
    deltix.util.lang.Filter<deltix.qsrv.hf.pub.InstrumentMessage>, java.io.Serializable

    public final class FeedFilter
    extends java.lang.Object
    implements java.io.Serializable, deltix.util.lang.Filter<deltix.qsrv.hf.pub.InstrumentMessage>
    See Also:
    Serialized Form
    • Method Detail

      • isFeedFilterFileName

        public static boolean isFeedFilterFileName​(java.lang.String name)
      • createCopy

        public static FeedFilter createCopy​(FeedFilter f)
        Constructs a copy message filter.
      • createRestricted

        public static FeedFilter createRestricted()
        Constructs a completely restricted message filter. This filter must be unrestricted on multiple ways in order to pass any message. This constructor is least useful in user code.
      • createUnrestricted

        public static FeedFilter createUnrestricted()
        Constructs a completely unrestricted message filter.
      • createFromFile

        public static FeedFilter createFromFile​(java.io.File f)
                                         throws java.io.IOException
        Constructs a completely message filter by reading a binary file.
        Throws:
        java.io.IOException
      • createFromStream

        public static FeedFilter createFromStream​(java.io.DataInputStream in)
                                           throws java.io.IOException
        Constructs a completely message filter by reading a binary stream.
        Throws:
        java.io.IOException
      • createFromFile

        public static FeedFilter createFromFile​(java.lang.String path)
                                         throws java.io.IOException
        Constructs a completely message filter by reading a binary file.
        Throws:
        java.io.IOException
      • createEquitiesFilter

        public static FeedFilter createEquitiesFilter​(java.lang.CharSequence... symbols)
        Constructs a filter that accepts messages for the given set of EQUITY symbols and nothing else.
      • createFilter

        public static FeedFilter createFilter​(deltix.qsrv.hf.pub.InstrumentIdentity... iids)
        Constructs a filter that accepts messages for the given set of instruments and nothing else.
      • getSupportedInstruments

        public static deltix.qsrv.hf.pub.InstrumentType[] getSupportedInstruments()
      • isSupportedInstrument

        public static boolean isSupportedInstrument​(deltix.qsrv.hf.pub.InstrumentType type)
      • getFilter

        public InstrumentFilter getFilter​(deltix.qsrv.hf.pub.InstrumentType type)
      • setRestricted

        public void setRestricted()
      • setUnrestricted

        public void setUnrestricted()
      • isRestricted

        public boolean isRestricted()
      • write

        public void write​(java.io.DataOutputStream out)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(java.io.File f)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(java.lang.String path)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public void read​(java.io.DataInputStream in)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public void read​(java.io.File f)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public void read​(java.lang.String path)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • createOptionsFilter

        public static FeedFilter createOptionsFilter​(java.lang.CharSequence... symbols)
        Constructs a filter that accepts messages for the given set of option roots.
      • createUnrestrictedNoSymbols

        public static FeedFilter createUnrestrictedNoSymbols()
        Constructs an unrestricted message filter, except that the set of symbols is empty. This is probably the most useful constructor in user code.
      • dump

        public void dump()
      • dump

        public void dump​(java.io.PrintWriter pw)
      • getSymbols

        public deltix.util.collections.CharSequenceSet getSymbols​(deltix.qsrv.hf.pub.InstrumentType type)
      • setAllMessageTypes

        public void setAllMessageTypes()
        Receive all message types.
      • clearMessageTypes

        public void clearMessageTypes()
        Receive no message types.
      • addMessageTypes

        public void addMessageTypes​(deltix.timebase.api.MarketMessageType... types)
        Add message types to subscription.
      • addMessageType

        public void addMessageType​(deltix.timebase.api.MarketMessageType type)
        Add message type to subscription.
      • removeMessageTypes

        public void removeMessageTypes​(deltix.timebase.api.MarketMessageType... types)
        Remove message types from subscription.
      • removeMessageType

        public void removeMessageType​(deltix.timebase.api.MarketMessageType type)
        Remove message type from subscription.
      • clearSymbols

        public void clearSymbols()
        Remove all symbols from subscription.
      • setAllSymbols

        public void setAllSymbols()
        Receive all messages that are broadcast, irrespective of the ticker symbol.
      • addSymbol

        public void addSymbol​(deltix.qsrv.hf.pub.InstrumentType type,
                              java.lang.CharSequence symbol)
      • addSymbol

        public void addSymbol​(deltix.qsrv.hf.pub.InstrumentType type,
                              java.lang.String symbol)
      • addSymbol

        public void addSymbol​(deltix.qsrv.hf.pub.InstrumentIdentity id)
      • removeSymbol

        public void removeSymbol​(deltix.qsrv.hf.pub.InstrumentType type,
                                 java.lang.CharSequence symbol)
      • removeSymbol

        public void removeSymbol​(deltix.qsrv.hf.pub.InstrumentType type,
                                 java.lang.String symbol)
      • removeSymbol

        public void removeSymbol​(deltix.qsrv.hf.pub.InstrumentIdentity id)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • accept

        public boolean accept​(deltix.qsrv.hf.pub.InstrumentMessage msg)
        Specified by:
        accept in interface deltix.util.lang.Filter<deltix.qsrv.hf.pub.InstrumentMessage>
      • acceptInstrument

        public boolean acceptInstrument​(deltix.qsrv.hf.pub.InstrumentIdentity id)
      • getBarSize

        public long getBarSize()
        Returns:
        accepted bar size in milliseconds. This attribute comes into play only when BAR_TYPE is enabled.
      • setBarSize

        public void setBarSize​(long barSize)
        Parameters:
        barSize - accepted bar size in milliseconds. This attribute comes into play only when BAR_TYPE is enabled.
      • clear

        public void clear()