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 InstrumentFilter
bondFilter
InstrumentFilter
customFilter
static java.lang.String
DOT_FILE_EXTENSION
InstrumentFilter
equityFilter
InstrumentFilter
etfFilter
InstrumentFilter
exchangeTradedFilter
static java.lang.String
FILE_EXTENSION
InstrumentFilter
futureFilter
InstrumentFilter
fxFilter
InstrumentFilter
indexFilter
InstrumentFilter
optionFilter
InstrumentFilter
simpleOptionFilter
InstrumentFilter
streamFilter
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(deltix.qsrv.hf.pub.InstrumentMessage msg)
boolean
acceptInstrument(deltix.qsrv.hf.pub.InstrumentIdentity id)
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(deltix.qsrv.hf.pub.InstrumentIdentity id)
void
addSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.CharSequence symbol)
void
addSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.String symbol)
void
clear()
void
clearMessageTypes()
Receive no message types.void
clearSymbols()
Remove all symbols from subscription.static FeedFilter
createCopy(FeedFilter f)
Constructs a copy message filter.static FeedFilter
createEquitiesFilter(java.lang.CharSequence... symbols)
Constructs a filter that accepts messages for the given set of EQUITY symbols and nothing else.static FeedFilter
createFilter(deltix.qsrv.hf.pub.InstrumentIdentity... iids)
Constructs a filter that accepts messages for the given set of instruments and nothing else.static FeedFilter
createFromFile(java.io.File f)
Constructs a completely message filter by reading a binary file.static FeedFilter
createFromFile(java.lang.String path)
Constructs a completely message filter by reading a binary file.static FeedFilter
createFromStream(java.io.DataInputStream in)
Constructs a completely message filter by reading a binary stream.static FeedFilter
createOptionsFilter(java.lang.CharSequence... symbols)
Constructs a filter that accepts messages for the given set of option roots.static FeedFilter
createRestricted()
Constructs a completely restricted message filter.static FeedFilter
createUnrestricted()
Constructs a completely unrestricted message filter.static FeedFilter
createUnrestrictedNoSymbols()
Constructs an unrestricted message filter, except that the set of symbols is empty.void
dump()
void
dump(java.io.PrintWriter pw)
long
getBarSize()
InstrumentFilter
getFilter(deltix.qsrv.hf.pub.InstrumentType type)
static deltix.qsrv.hf.pub.InstrumentType[]
getSupportedInstruments()
deltix.util.collections.CharSequenceSet
getSymbols(deltix.qsrv.hf.pub.InstrumentType type)
InstrumentFilter[]
getTypeFilters()
static boolean
isFeedFilterFileName(java.lang.String name)
boolean
isRestricted()
static boolean
isSupportedInstrument(deltix.qsrv.hf.pub.InstrumentType type)
void
read(java.io.DataInputStream in)
void
read(java.io.File f)
void
read(java.lang.String path)
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(deltix.qsrv.hf.pub.InstrumentIdentity id)
void
removeSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.CharSequence symbol)
void
removeSymbol(deltix.qsrv.hf.pub.InstrumentType type, java.lang.String symbol)
void
setAllMessageTypes()
Receive all message types.void
setAllSymbols()
Receive all messages that are broadcast, irrespective of the ticker symbol.void
setBarSize(long barSize)
void
setMessageTypes(deltix.timebase.api.MarketMessageType... types)
Re-set subscribed message types to the specified list.void
setRestricted()
void
setUnrestricted()
java.lang.String
toString()
static FeedFilter
union(FeedFilter f1, FeedFilter f2)
void
write(java.io.DataOutputStream out)
void
write(java.io.File f)
void
write(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:
toString
in classjava.lang.Object
-
accept
public boolean accept(deltix.qsrv.hf.pub.InstrumentMessage msg)
- Specified by:
accept
in 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()
-
-