Class InstrumentFilter

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    OptionFilter

    public class InstrumentFilter
    extends java.lang.Object
    implements java.io.Serializable
    Filters messages for one type of instruments.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      deltix.qsrv.hf.pub.InstrumentType type  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptAllSymbols()  
      boolean acceptMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg)  
      boolean acceptMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg, RecordClassDescriptor type)  
      protected boolean acceptMessageType​(deltix.qsrv.hf.pub.InstrumentMessage msg)  
      protected boolean acceptMessageType​(RecordClassDescriptor rcd)  
      boolean acceptMessageType​(deltix.timebase.api.MarketMessageType type)  
      boolean acceptSymbol​(byte[] bytes, int offset, int length)  
      boolean acceptSymbol​(java.lang.CharSequence symbol)  
      boolean acceptSymbol​(java.lang.CharSequence symbol, int offset, int len)  
      void addMessageType​(deltix.timebase.api.MarketMessageType type)
      Add message type to subscription.
      void addMessageTypes​(deltix.timebase.api.MarketMessageType... types)
      Add message types to subscription.
      void addSymbol​(java.lang.CharSequence symbol)
      Adds a symbol to message subscription.
      protected void addSymbol​(java.lang.CharSequence symbol, int start, int end)
      Adds a symbol to message subscription.
      void addSymbol​(java.lang.String symbol)
      Adds a symbol to message subscription.
      void addSymbols​(java.lang.CharSequence... symbols)
      Adds a symbol to message subscription.
      void addSymbols​(java.lang.String... symbols)
      Adds a symbol to message subscription.
      void applyMessageTypeMask​(long mask)  
      void clear()  
      void clearMessageTypes()
      Receive no message types.
      void clearSymbols()
      Removes all symbols from subscription.
      void dump​(java.io.PrintWriter out, java.lang.String prefix)  
      void dump​(java.lang.String prefix)  
      long getMessageTypeMask()  
      deltix.timebase.api.MarketMessageType[] getMessageTypes()
      Returns accepted message types.
      deltix.util.collections.CharSequenceSet getSymbols()  
      deltix.qsrv.hf.pub.InstrumentType getType()  
      boolean isRestricted()  
      boolean isUnrestricted()  
      void read​(java.io.DataInputStream in)  
      void removeMessageType​(deltix.timebase.api.MarketMessageType type)
      Remove message type from subscription.
      void removeMessageTypes​(deltix.timebase.api.MarketMessageType... types)
      Remove message types from subscription.
      void removeSymbol​(java.lang.CharSequence symbol)
      Removes a symbol from message subscription.
      protected void removeSymbol​(java.lang.CharSequence symbol, int start, int end)
      Removes a symbol from message subscription.
      void removeSymbol​(java.lang.String symbol)
      Removes a symbol from message subscription.
      void removeSymbols​(java.lang.CharSequence... symbols)
      Removes symbols from message subscription.
      void removeSymbols​(java.lang.String... symbols)
      Removes symbols from message subscription.
      void setAllMessageTypes()
      Receive all message types.
      void setAllSymbols()
      Receive all messages that are broadcast, irrespective of the ticker symbol.
      void setCopy​(InstrumentFilter f)
      Creates a filter as copy a specified filter.
      void setMessageTypes​(deltix.timebase.api.MarketMessageType... types)
      Re-set subscribed message types to the specified list.
      void setRestricted()  
      void setSymbols​(deltix.util.collections.CharSequenceSet symbols)  
      void setUnion​(InstrumentFilter f1, InstrumentFilter f2)
      Creates a filter as union of two specified filters.
      void setUnrestricted()  
      java.lang.String toString()  
      void write​(java.io.DataOutputStream out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • type

        public final deltix.qsrv.hf.pub.InstrumentType type
    • Constructor Detail

      • InstrumentFilter

        public InstrumentFilter()
    • Method Detail

      • setCopy

        public void setCopy​(InstrumentFilter f)
        Creates a filter as copy a specified filter.
      • setRestricted

        public void setRestricted()
      • setUnrestricted

        public void setUnrestricted()
      • isRestricted

        public boolean isRestricted()
      • isUnrestricted

        public boolean isUnrestricted()
      • write

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

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

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

        public void setSymbols​(deltix.util.collections.CharSequenceSet symbols)
      • clearSymbols

        public void clearSymbols()
        Removes all symbols from subscription.
      • addSymbol

        public void addSymbol​(java.lang.String symbol)
        Adds a symbol to message subscription.
        Parameters:
        symbol - The symbol to add.
      • addSymbol

        public final void addSymbol​(java.lang.CharSequence symbol)
        Adds a symbol to message subscription.
        Parameters:
        symbol - The symbol to add.
      • addSymbols

        public void addSymbols​(java.lang.String... symbols)
        Adds a symbol to message subscription.
        Parameters:
        symbols - The symbols to add.
      • addSymbols

        public final void addSymbols​(java.lang.CharSequence... symbols)
        Adds a symbol to message subscription.
        Parameters:
        symbols - The symbols to add.
      • addSymbol

        protected void addSymbol​(java.lang.CharSequence symbol,
                                 int start,
                                 int end)
        Adds a symbol to message subscription.
        Parameters:
        symbol - The symbol to add.
        end - index of final position (excludive)
      • removeSymbol

        public void removeSymbol​(java.lang.String symbol)
        Removes a symbol from message subscription.
        Parameters:
        symbol - The symbol to remove.
      • removeSymbol

        protected void removeSymbol​(java.lang.CharSequence symbol,
                                    int start,
                                    int end)
        Removes a symbol from message subscription.
        Parameters:
        symbol - The symbol to remove.
        end - index of final position (excludive)
      • removeSymbol

        public final void removeSymbol​(java.lang.CharSequence symbol)
        Removes a symbol from message subscription.
        Parameters:
        symbol - The symbol to remove.
      • removeSymbols

        public final void removeSymbols​(java.lang.String... symbols)
        Removes symbols from message subscription.
        Parameters:
        symbols - The symbols to remove.
      • removeSymbols

        public final void removeSymbols​(java.lang.CharSequence... symbols)
        Removes symbols from message subscription.
        Parameters:
        symbols - The symbols to remove.
      • 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.
      • getMessageTypes

        public deltix.timebase.api.MarketMessageType[] getMessageTypes()
        Returns accepted message types.
      • getSymbols

        public final deltix.util.collections.CharSequenceSet getSymbols()
      • toString

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

        public void dump​(java.lang.String prefix)
      • dump

        public void dump​(java.io.PrintWriter out,
                         java.lang.String prefix)
      • acceptMessageType

        public final boolean acceptMessageType​(deltix.timebase.api.MarketMessageType type)
      • acceptSymbol

        public boolean acceptSymbol​(java.lang.CharSequence symbol)
      • acceptSymbol

        public boolean acceptSymbol​(java.lang.CharSequence symbol,
                                    int offset,
                                    int len)
      • acceptSymbol

        public boolean acceptSymbol​(byte[] bytes,
                                    int offset,
                                    int length)
      • acceptAllSymbols

        public boolean acceptAllSymbols()
      • acceptMessageType

        protected final boolean acceptMessageType​(deltix.qsrv.hf.pub.InstrumentMessage msg)
      • acceptMessage

        public boolean acceptMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg)
      • acceptMessage

        public boolean acceptMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg,
                                     RecordClassDescriptor type)
      • clear

        public void clear()
      • getType

        public deltix.qsrv.hf.pub.InstrumentType getType()
      • getMessageTypeMask

        public long getMessageTypeMask()
      • applyMessageTypeMask

        public void applyMessageTypeMask​(long mask)