Class 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:

    • Number of processed BinaryCDRs.
    • Number of processed StringCDRs.
    • Processing time of each file.
    • Self lifetime, that is, time difference between call to init and destroy methods.
    By default statistics are output to standard error (stderr).
    • Constructor Detail

      • GenerateStatsCdrProcessor

        public GenerateStatsCdrProcessor()
    • Method Detail

      • destroy

        public void destroy()
        Description copied from interface: CdrProcessor
        Called to indicate to a CdrProcessor that the processor is being taken out of service. This method is called only once and only if previous invocation of init did NOT throw an exception. After call to this method no further calls are invoked on CdrProcessor instance.
        Specified by:
        destroy in interface CdrProcessor
        Overrides:
        destroy in class CdrProcessorAdapter
      • 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 interface CdrProcessor
        Overrides:
        processBinaryCdr in class CdrProcessorAdapter
        Parameters:
        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.
        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 interface CdrProcessor
        Overrides:
        processStringCdr in class CdrProcessorAdapter
        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.