Package deltix.qsrv.hf.pub
Class FeedFilter
- java.lang.Object
-
- deltix.qsrv.hf.pub.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
-
-
Field Summary
Fields Modifier and Type Field Description InstrumentFilterbondFilterInstrumentFiltercustomFilterstatic java.lang.StringDOT_FILE_EXTENSIONInstrumentFilterequityFilterInstrumentFilteretfFilterInstrumentFilterexchangeTradedFilterstatic java.lang.StringFILE_EXTENSIONInstrumentFilterfutureFilterInstrumentFilterfxFilterInstrumentFilterindexFilterInstrumentFilteroptionFilterInstrumentFiltersimpleOptionFilterInstrumentFilterstreamFilter
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(deltix.qsrv.hf.pub.InstrumentMessage msg)booleanacceptInstrument(deltix.qsrv.hf.pub.InstrumentIdentity id)voidaddMessageType(deltix.timebase.api.MarketMessageType type)Add message type to subscription.voidaddMessageTypes(deltix.timebase.api.MarketMessageType... types)Add message types to subscription.voidaddSymbol(deltix.qsrv.hf.pub.InstrumentIdentity id)voidaddSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.CharSequence symbol)voidaddSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.String symbol)voidclear()voidclearMessageTypes()Receive no message types.voidclearSymbols()Remove all symbols from subscription.static FeedFiltercreateCopy(FeedFilter f)Constructs a copy message filter.static FeedFiltercreateEquitiesFilter(java.lang.CharSequence... symbols)Constructs a filter that accepts messages for the given set of EQUITY symbols and nothing else.static FeedFiltercreateFilter(deltix.qsrv.hf.pub.InstrumentIdentity... iids)Constructs a filter that accepts messages for the given set of instruments and nothing else.static FeedFiltercreateFromFile(java.io.File f)Constructs a completely message filter by reading a binary file.static FeedFiltercreateFromFile(java.lang.String path)Constructs a completely message filter by reading a binary file.static FeedFiltercreateFromStream(java.io.DataInputStream in)Constructs a completely message filter by reading a binary stream.static FeedFiltercreateOptionsFilter(java.lang.CharSequence... symbols)Constructs a filter that accepts messages for the given set of option roots.static FeedFiltercreateRestricted()Constructs a completely restricted message filter.static FeedFiltercreateUnrestricted()Constructs a completely unrestricted message filter.static FeedFiltercreateUnrestrictedNoSymbols()Constructs an unrestricted message filter, except that the set of symbols is empty.voiddump()voiddump(java.io.PrintWriter pw)longgetBarSize()InstrumentFiltergetFilter(deltix.qsrv.hf.pub.InstrumentType type)static deltix.qsrv.hf.pub.InstrumentType[]getSupportedInstruments()deltix.util.collections.CharSequenceSetgetSymbols(deltix.qsrv.hf.pub.InstrumentType type)InstrumentFilter[]getTypeFilters()static booleanisFeedFilterFileName(java.lang.String name)booleanisRestricted()static booleanisSupportedInstrument(deltix.qsrv.hf.pub.InstrumentType type)voidread(java.io.DataInputStream in)voidread(java.io.File f)voidread(java.lang.String path)voidremoveMessageType(deltix.timebase.api.MarketMessageType type)Remove message type from subscription.voidremoveMessageTypes(deltix.timebase.api.MarketMessageType... types)Remove message types from subscription.voidremoveSymbol(deltix.qsrv.hf.pub.InstrumentIdentity id)voidremoveSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.CharSequence symbol)voidremoveSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.String symbol)voidsetAllMessageTypes()Receive all message types.voidsetAllSymbols()Receive all messages that are broadcast, irrespective of the ticker symbol.voidsetBarSize(long barSize)voidsetMessageTypes(deltix.timebase.api.MarketMessageType... types)Re-set subscribed message types to the specified list.voidsetRestricted()voidsetUnrestricted()java.lang.StringtoString()static FeedFilterunion(FeedFilter f1, FeedFilter f2)voidwrite(java.io.DataOutputStream out)voidwrite(java.io.File f)voidwrite(java.lang.String path)
-
-
-
Field Detail
-
FILE_EXTENSION
public static final java.lang.String FILE_EXTENSION
- See Also:
- Constant Field Values
-
DOT_FILE_EXTENSION
public static final java.lang.String DOT_FILE_EXTENSION
- See Also:
- Constant Field Values
-
equityFilter
public InstrumentFilter equityFilter
-
optionFilter
public InstrumentFilter optionFilter
-
simpleOptionFilter
public InstrumentFilter simpleOptionFilter
-
futureFilter
public InstrumentFilter futureFilter
-
bondFilter
public InstrumentFilter bondFilter
-
fxFilter
public InstrumentFilter fxFilter
-
indexFilter
public InstrumentFilter indexFilter
-
etfFilter
public InstrumentFilter etfFilter
-
customFilter
public InstrumentFilter customFilter
-
streamFilter
public InstrumentFilter streamFilter
-
exchangeTradedFilter
public InstrumentFilter exchangeTradedFilter
-
-
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)
-
getTypeFilters
public InstrumentFilter[] getTypeFilters()
-
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.
-
union
public static FeedFilter union(FeedFilter f1, FeedFilter f2)
-
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.
-
setMessageTypes
public void setMessageTypes(deltix.timebase.api.MarketMessageType... types)
Re-set subscribed message types to the specified list. Equivalent to callingclearMessageTypes()and thenaddMessageTypes(deltix.timebase.api.MarketMessageType...)sequentially.
-
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:
toStringin classjava.lang.Object
-
accept
public boolean accept(deltix.qsrv.hf.pub.InstrumentMessage msg)
- Specified by:
acceptin interfacedeltix.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()
-
-