public abstract class AbstractTypedCdrProcessor<M extends com.google.protobuf.GeneratedMessage> extends CdrProcessorAdapter
CdrProcessor
that parses and processes BinaryCDR
s representing Message
s of specified class.CONTINUE_ON_ERROR_PROPERTY
Constructor and Description |
---|
AbstractTypedCdrProcessor(Class<M> messageClass)
Equivalent to calling
AbstractTypedCdrProcessor(messageClass, true) |
AbstractTypedCdrProcessor(Class<M> clazz,
boolean continueChainOnNonMatchingMessage)
Construct an instance of this class to process
Message s of class clazz . |
Modifier and Type | Method and Description |
---|---|
boolean |
processBinaryCdr(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.BinaryCDR binaryCdr,
com.google.protobuf.Descriptors.Descriptor descriptor,
com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp,
com.google.protobuf.ExtensionRegistry registry)
Implementation of
CdrProcessor.processBinaryCdr that parses Message of provided class
and invokes processMessage . |
protected abstract boolean |
processMessage(M message,
com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
This method is called whenever a
BinaryCDR record representing Message of selected class is encountered in
CDR file. |
protected void |
registerExtensions(com.google.protobuf.ExtensionRegistry registry)
Method called during construction of
AbstractTypedCdrProcessor . |
destroy, getContinueOnError, init, initialize, processedFile, processFooter, processHeader, processingFile, processStringCdr
public AbstractTypedCdrProcessor(Class<M> messageClass)
AbstractTypedCdrProcessor(messageClass, true)
messageClass
- Class representing Message
s to be processed.public AbstractTypedCdrProcessor(Class<M> clazz, boolean continueChainOnNonMatchingMessage)
Message
s of class clazz
.clazz
- Class representing Message
s to be processed.continueChainOnNonMatchingMessage
- return this value from processBinaryCdr
method for Message
s of other than instances of clazz
.protected abstract boolean processMessage(M message, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
BinaryCDR
record representing Message
of selected class is encountered in
CDR file.message
- decoded Message
.timeStamp
- timestamp when the record was written.CdrProcessor
in pipeline, false otherwise.protected void registerExtensions(com.google.protobuf.ExtensionRegistry registry)
AbstractTypedCdrProcessor
. Subclass should override this
method and register extensions that it wants to have automatically parsed.registry
- the ExtensionRegistry where subclass may register extensions to be automatically parsed.public final boolean processBinaryCdr(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.BinaryCDR binaryCdr, com.google.protobuf.Descriptors.Descriptor descriptor, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp, com.google.protobuf.ExtensionRegistry registry)
CdrProcessor.processBinaryCdr
that parses Message
of provided class
and invokes processMessage
.processBinaryCdr
in interface CdrProcessor
processBinaryCdr
in class CdrProcessorAdapter
binaryCdr
- BinaryCDR
record encapsulating the bytes of CDR Message
.descriptor
- Descriptor
of the CDR Message
.timeStamp
- timestamp when the record was written.registry
- ExtensionRegistry
to properly decode extension fields of the CDR Message
.continueChainOnNonMatchingMessage
constructor parameter.