Package deltix.qsrv.hf.tickdb.pub
Class RawMessageHelper
- java.lang.Object
-
- deltix.qsrv.hf.tickdb.pub.RawMessageHelper
-
public class RawMessageHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description CodecMetaFactory
factory
-
Constructor Summary
Constructors Constructor Description RawMessageHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<RawMessage>
filter(java.util.Collection<RawMessage> messages, java.util.Map<java.lang.String,? extends java.lang.Iterable<java.lang.String>> params)
java.util.Collection<RawMessage>
filterObjects(java.util.Collection<RawMessage> messages, java.util.Map<java.lang.String,? extends java.lang.Iterable<?>> params)
java.lang.Object
getValue(RawMessage msg, java.lang.String field)
java.lang.Object
getValue(RawMessage msg, java.lang.String field, java.lang.Object notFoundValue)
java.util.Map<java.lang.String,java.lang.Object>
getValues(RawMessage msg)
boolean
isAccepted(RawMessage msg, java.util.Map<java.lang.String,? extends java.lang.Iterable<java.lang.String>> params)
Checks whether message is accepted with given parameters.boolean
isAcceptedObjects(RawMessage msg, java.util.Map<java.lang.String,? extends java.lang.Iterable<?>> params)
static java.lang.Object
parseValue(DataType type, java.lang.String s)
static void
setValue(UnboundEncoder encoder, NonStaticFieldInfo info, java.lang.Object value)
void
setValues(RawMessage msg, java.util.Map<java.lang.String,java.lang.Object> values)
-
-
-
Field Detail
-
factory
public CodecMetaFactory factory
-
-
Method Detail
-
setValues
public void setValues(RawMessage msg, java.util.Map<java.lang.String,java.lang.Object> values)
-
getValues
public java.util.Map<java.lang.String,java.lang.Object> getValues(RawMessage msg)
-
setValue
public static void setValue(UnboundEncoder encoder, NonStaticFieldInfo info, java.lang.Object value)
-
parseValue
public static java.lang.Object parseValue(DataType type, java.lang.String s)
-
getValue
public java.lang.Object getValue(RawMessage msg, java.lang.String field, java.lang.Object notFoundValue)
-
getValue
public java.lang.Object getValue(RawMessage msg, java.lang.String field) throws FieldNotFoundException
- Throws:
FieldNotFoundException
-
isAccepted
public boolean isAccepted(RawMessage msg, java.util.Map<java.lang.String,? extends java.lang.Iterable<java.lang.String>> params)
Checks whether message is accepted with given parameters.
Example. We've got 3 messages: 1) {a:1,b:2,c:4}, 2) {a:1,b:4,c:3}, 3) {a:1,c:3,d:5}.
Also we've got params: {a:[1], b:[1,2,3]}.- 1st message will be accepted, cause a=1 and b=2.
- 2nd message won't be accepted, cause a=1, but b=4.
- 3rd message won't be accepted, cause it doesn't contain field b.
- Parameters:
msg
- raw messageparams
- map with params in String form
-
isAcceptedObjects
public boolean isAcceptedObjects(RawMessage msg, java.util.Map<java.lang.String,? extends java.lang.Iterable<?>> params)
-
filter
public java.util.Collection<RawMessage> filter(java.util.Collection<RawMessage> messages, java.util.Map<java.lang.String,? extends java.lang.Iterable<java.lang.String>> params)
-
filterObjects
public java.util.Collection<RawMessage> filterObjects(java.util.Collection<RawMessage> messages, java.util.Map<java.lang.String,? extends java.lang.Iterable<?>> params)
-
-