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 void
destroy()
Called to indicate to aCdrProcessor
that the processor is being taken out of service.void
initialize(Properties properties)
This method is called fromCdrProcessorAdapter.init(Properties)
and may be overridden to customize the initialization process.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)
Called when encountering a binary CDR in CDR file.void
processedFile(String path)
Called after processing all data contained in file denoted bypath
.void
processingFile(String path)
Called before processing any data contained in file denoted bypath
.boolean
processStringCdr(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:CdrProcessorAdapter
This method is called fromCdrProcessorAdapter.init(Properties)
and may be overridden to customize the initialization process.- Overrides:
initialize
in classCdrProcessorAdapter
- Parameters:
properties
- properties provided using "processor-property" options when invokingCdrPipeline
.
-
destroy
public void destroy()
Description copied from interface:CdrProcessor
Called to indicate to aCdrProcessor
that the processor is being taken out of service. This method is called only once and only if previous invocation ofinit
did NOT throw an exception. After call to this method no further calls are invoked onCdrProcessor
instance.- Specified by:
destroy
in interfaceCdrProcessor
- Overrides:
destroy
in classCdrProcessorAdapter
-
processingFile
public void processingFile(String path)
Description copied from interface:CdrProcessor
Called before processing any data contained in file denoted bypath
.- Specified by:
processingFile
in interfaceCdrProcessor
- Overrides:
processingFile
in classCdrProcessorAdapter
- Parameters:
path
- path denoting the CDR file to be processed.
-
processedFile
public void processedFile(String path)
Description copied from interface:CdrProcessor
Called after processing all data contained in file denoted bypath
.- Specified by:
processedFile
in interfaceCdrProcessor
- Overrides:
processedFile
in 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:CdrProcessor
Called when encountering a binary CDR in CDR file.- Specified by:
processBinaryCdr
in interfaceCdrProcessor
- Overrides:
processBinaryCdr
in classCdrProcessorAdapter
- Parameters:
binaryCdr
-BinaryCDR
record encapsulating the bytes of CDRMessage
.descriptor
-Descriptor
of the CDRMessage
.timeStamp
- timestamp when the record was written.registry
-ExtensionRegistry
to properly decode extension fields of the CDRMessage
.- Returns:
- true if record should be processed by next
CdrProcessor
in 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:CdrProcessor
Called when encountering a string CDR in CDR file.- Specified by:
processStringCdr
in interfaceCdrProcessor
- Overrides:
processStringCdr
in classCdrProcessorAdapter
- Parameters:
stringCdr
- string representing the CDR.timeStamp
- timestamp when the record was written.- Returns:
- true if record should be processed by next
CdrProcessor
in pipeline, false otherwise.
-
-