public abstract class CdrProcessorAdapter extends Object implements CdrProcessor
CdrProcessor
implementations which provides implementations of all of its methods.
Sub-classes may override the selected methods to capture just the events they are interested in.
init(Properties)
method is final, override the initialize(Properties)
to customize initialization.processBinaryCdr
and processStringCdr
return true.CONTINUE_ON_ERROR_PROPERTY
Constructor and Description |
---|
CdrProcessorAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called to indicate to a
CdrProcessor that the processor is being taken out of service. |
boolean |
getContinueOnError()
Getter for value of
CdrProcessor.CONTINUE_ON_ERROR_PROPERTY property. |
void |
init(Properties properties)
Called to indicate to a
CdrProcessor that the processor is being placed into service. |
void |
initialize(Properties properties)
This method is called from
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 by
path . |
void |
processFooter(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.Footer footer,
com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
Called when encountering a
Footer in binary CDR file. |
void |
processHeader(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.Header header,
com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
Called when encountering a
Header in binary CDR file. |
void |
processingFile(String path)
Called before processing any data contained in file denoted by
path . |
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.
|
public final void init(Properties properties)
CdrProcessor
CdrProcessor
that the processor is being placed into service.
This method is called exactly once after instantiating the CdrProcessor
.init
in interface CdrProcessor
properties
- properties provided using "processor-property" options when invoking CdrPipeline
.public void initialize(Properties properties)
init(Properties)
and may be overridden to customize the initialization process.properties
- properties provided using "processor-property" options when invoking CdrPipeline
.public void destroy()
CdrProcessor
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.destroy
in interface CdrProcessor
public void processingFile(String path)
CdrProcessor
path
.processingFile
in interface CdrProcessor
path
- path denoting the CDR file to be processed.public void processedFile(String path)
CdrProcessor
path
.processedFile
in interface CdrProcessor
path
- path denoting the CDR file that was processed.public void processHeader(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.Header header, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
CdrProcessor
Header
in binary CDR file.processHeader
in interface CdrProcessor
header
- header data contained in CDR file.timeStamp
- timestamp when the header was written.public void processFooter(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.Footer footer, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
CdrProcessor
Footer
in binary CDR file.processFooter
in interface CdrProcessor
footer
- footer data contained in CDR file.timeStamp
- timestamp when the footer was written.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)
CdrProcessor
processBinaryCdr
in interface CdrProcessor
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
.CdrProcessor
in pipeline, false otherwise.public boolean processStringCdr(com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.StringCDR stringCdr, com.opencloud.slee.resources.cdr.protobuf.CdrFileFormat.CdrFile.DateTime timeStamp)
CdrProcessor
processStringCdr
in interface CdrProcessor
stringCdr
- string representing the CDR.timeStamp
- timestamp when the record was written.CdrProcessor
in pipeline, false otherwise.public boolean getContinueOnError()
CdrProcessor.CONTINUE_ON_ERROR_PROPERTY
property.CdrProcessor.CONTINUE_ON_ERROR_PROPERTY
property.