Class GenerateStatsCdrProcessor
- java.lang.Object
-
- com.opencloud.slee.resources.cdr.process.CdrProcessorAdapter
-
- com.opencloud.slee.resources.cdr.process.GenerateStatsCdrProcessor
-
- All Implemented Interfaces:
CdrProcessor
public final class GenerateStatsCdrProcessor extends CdrProcessorAdapter
Gather and display statistics related to number of processed CDR records and processing time.Gathers statistics related to:
By default statistics are output to standard error (stderr).
-
-
Field Summary
-
Fields inherited from interface com.opencloud.slee.resources.cdr.process.CdrProcessor
CONTINUE_ON_ERROR_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description GenerateStatsCdrProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Called to indicate to aCdrProcessorthat the processor is being taken out of service.voidinitialize(Properties properties)This method is called fromCdrProcessorAdapter.init(Properties)and may be overridden to customize the initialization process.booleanprocessBinaryCdr(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)Called when encountering a binary CDR in CDR file.voidprocessedFile(String path)Called after processing all data contained in file denoted bypath.voidprocessingFile(String path)Called before processing any data contained in file denoted bypath.booleanprocessStringCdr(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.StringCDR stringCdr, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)Called when encountering a string CDR in CDR file.-
Methods inherited from class com.opencloud.slee.resources.cdr.process.CdrProcessorAdapter
getContinueOnError, init, processFooter, processHeader
-
-
-
-
Method Detail
-
initialize
public void initialize(Properties properties)
Description copied from class:CdrProcessorAdapterThis method is called fromCdrProcessorAdapter.init(Properties)and may be overridden to customize the initialization process.- Overrides:
initializein classCdrProcessorAdapter- Parameters:
properties- properties provided using "processor-property" options when invokingCdrPipeline.
-
destroy
public void destroy()
Description copied from interface:CdrProcessorCalled to indicate to aCdrProcessorthat the processor is being taken out of service. This method is called only once and only if previous invocation ofinitdid NOT throw an exception. After call to this method no further calls are invoked onCdrProcessorinstance.- Specified by:
destroyin interfaceCdrProcessor- Overrides:
destroyin classCdrProcessorAdapter
-
processingFile
public void processingFile(String path)
Description copied from interface:CdrProcessorCalled before processing any data contained in file denoted bypath.- Specified by:
processingFilein interfaceCdrProcessor- Overrides:
processingFilein classCdrProcessorAdapter- Parameters:
path- path denoting the CDR file to be processed.
-
processedFile
public void processedFile(String path)
Description copied from interface:CdrProcessorCalled after processing all data contained in file denoted bypath.- Specified by:
processedFilein interfaceCdrProcessor- Overrides:
processedFilein classCdrProcessorAdapter- Parameters:
path- path denoting the CDR file that was processed.
-
processBinaryCdr
public 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)Description copied from interface:CdrProcessorCalled when encountering a binary CDR in CDR file.- Specified by:
processBinaryCdrin interfaceCdrProcessor- Overrides:
processBinaryCdrin classCdrProcessorAdapter- Parameters:
binaryCdr-BinaryCDRrecord encapsulating the bytes of CDRMessage.descriptor-Descriptorof the CDRMessage.timeStamp- timestamp when the record was written.registry-ExtensionRegistryto properly decode extension fields of the CDRMessage.- Returns:
- true if record should be processed by next
CdrProcessorin pipeline, false otherwise.
-
processStringCdr
public boolean processStringCdr(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.StringCDR stringCdr, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)Description copied from interface:CdrProcessorCalled when encountering a string CDR in CDR file.- Specified by:
processStringCdrin interfaceCdrProcessor- Overrides:
processStringCdrin classCdrProcessorAdapter- Parameters:
stringCdr- string representing the CDR.timeStamp- timestamp when the record was written.- Returns:
- true if record should be processed by next
CdrProcessorin pipeline, false otherwise.
-
-