Package com.opencloud.slee.resources.cdr
Interface CDRProvider
-
public interface CDRProvider
Public SBB interface for CDR generation via the CDR resource adaptor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CdrFileType
getFileFormat()
This method is similar togetFileFormat(String streamName)
but is targeted towards the default stream.CdrFileType
getFileFormat(String streamName)
Get the CDR file format of the given stream that this entity is configured to write.boolean
isOperational()
This method is similar toisOperational(String streamName)
but is targeted towards the default stream.boolean
isOperational(String streamName)
Check to see if a future call to writeCDR to given stream is likely to succeed.void
writeCDR(com.google.protobuf.Message cdr)
This method is similar towriteCDR(Message cdr, String streamName)
but is targeted towards the default stream.void
writeCDR(com.google.protobuf.Message cdr, String streamName)
Record a binary-format CDR to given stream.void
writeCDR(CallDetailRecord cdr)
Deprecated.Prefer use ofwriteCDR(String)
orwriteCDR(Message)
void
writeCDR(ExtensionMessage cdr)
This method is similar towriteCDR(ExtensionMessage extensionCdr, String streamName)
but is targeted towards the default stream.void
writeCDR(ExtensionMessage cdr, String streamName)
Record a binary-format CDR with extension definitions to given stream.void
writeCDR(String cdr)
This method is similar towriteCDR(String cdr, String streamName)
but is targeted towards the default stream.void
writeCDR(String cdr, String streamName)
Record a string-format CDR to given stream.
-
-
-
Method Detail
-
writeCDR
void writeCDR(String cdr) throws WriteTimeoutException, StreamNotFoundException, IOException
This method is similar towriteCDR(String cdr, String streamName)
but is targeted towards the default stream.- Parameters:
cdr
- the string to write.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeout.StreamNotFoundException
- if the RA did not initialise properly, or the default stream is missing.IOException
- if the CDR cannot be written due to a write error.- See Also:
writeCDR(java.lang.String,java.lang.String)
-
writeCDR
void writeCDR(String cdr, String streamName) throws WriteTimeoutException, StreamNotFoundException, IOException
Record a string-format CDR to given stream. If this CDR entity is configured to use text format, the provided string is written directly to the file (followed by a newline) If this CDR entity is configured to use binary format, the provided string is written as a StringCDR record.- Parameters:
cdr
- the string to write.streamName
- the name of the stream to write to.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeout.StreamNotFoundException
- if the RA did not initialise properly, or the stream is missing.IOException
- if the CDR cannot be written due to a write error.
-
writeCDR
void writeCDR(com.google.protobuf.Message cdr) throws WriteTimeoutException, StreamNotFoundException, IOException
This method is similar towriteCDR(Message cdr, String streamName)
but is targeted towards the default stream. If this CDR entity is configured to use binary format, the provided message is written as a BinaryCDR record. If this CDR entity is configured to use text format, an exception is thrown.- Parameters:
cdr
- the CDR to write.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeout.StreamNotFoundException
- if the RA did not initialise properly, or the default stream is missing.IOException
- if the CDR cannot be written due to a write error.IllegalArgumentException
- if the CDR RA is configured for text output.- See Also:
writeCDR(com.google.protobuf.Message,java.lang.String)
-
writeCDR
void writeCDR(ExtensionMessage cdr) throws WriteTimeoutException, StreamNotFoundException, IOException
This method is similar towriteCDR(ExtensionMessage extensionCdr, String streamName)
but is targeted towards the default stream.- Parameters:
cdr
- the CDR with extension definitions to write.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeout.StreamNotFoundException
- if the RA did not initialise properly, or the default stream is missing.IOException
- if the CDR cannot be written due to a write error.IllegalArgumentException
- if the CDR RA is configured for text output.- See Also:
writeCDR(com.opencloud.slee.resources.cdr.ExtensionMessage,java.lang.String)
-
writeCDR
void writeCDR(com.google.protobuf.Message cdr, String streamName) throws WriteTimeoutException, StreamNotFoundException, IOException
Record a binary-format CDR to given stream. If this CDR entity is configured to use binary format, the provided message is written as a BinaryCDR record. If this CDR entity is configured to use text format, an exception is thrown.- Parameters:
cdr
- the CDR to write.streamName
- the name of the stream to write to.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeoutStreamNotFoundException
- if the RA did not initialise properly, or the stream is missing.IOException
- if the CDR cannot be written due to a write errorIllegalArgumentException
- if the CDR RA is configured for text output
-
writeCDR
void writeCDR(ExtensionMessage cdr, String streamName) throws WriteTimeoutException, StreamNotFoundException, IOException
Record a binary-format CDR with extension definitions to given stream. If this CDR entity is configured to use binary format, the provided extension message is written as a BinaryCDR record, in addition to the set of extension definition records for the used extensions (only if have not already been written to the CDR file). If this CDR entity is configured to use text format, an exception is thrown.- Parameters:
cdr
- the CDR with extension definitions to write.streamName
- the name of the stream to write to.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeout.StreamNotFoundException
- if the RA did not initialise properly, or the stream is missing.IOException
- if the CDR cannot be written due to a write error.IllegalArgumentException
- if the CDR RA is configured for text output.
-
writeCDR
@Deprecated void writeCDR(CallDetailRecord cdr) throws WriteTimeoutException, IOException
Deprecated.Prefer use ofwriteCDR(String)
orwriteCDR(Message)
Record a string-format CDR.The provided instance may be a SBB-specific subclass of CallDetailRecord; it should override toString() to provide an appropriately-formatted single CDR output line (without newline) for the CDR.
- Parameters:
cdr
- the CDR to write.- Throws:
WriteTimeoutException
- if the CDR cannot be written within the entity's configured write timeoutIOException
- if the RA did not initialise properly, or the CDR cannot be written due to a write error.
-
isOperational
boolean isOperational() throws StreamNotFoundException
This method is similar toisOperational(String streamName)
but is targeted towards the default stream.- Returns:
- true if the CDR RA is currently writing CDRs successfully; false if it is currently encountering CDR write errors or timeouts
- Throws:
StreamNotFoundException
- if the RA did not initialise properly, or the default stream is missing.- See Also:
isOperational(String)
-
isOperational
boolean isOperational(String streamName) throws StreamNotFoundException
Check to see if a future call to writeCDR to given stream is likely to succeed. This method does not provide a guarantee that future calls will or will not succeed; it only reflects the state of the RA at the time of the call, based on recent attempts to write CDRs. Even if it returns true, a later call to writeCDR might throw an exception (if an error condition occurs between the two calls). Even if it returns false, a later call to writeCDR might succeed (if the error condition is repaired between calls)- Parameters:
streamName
- the name of the stream to write to.- Returns:
- true if the CDR RA is currently writing CDRs to given stream successfully; false if it is currently encountering CDR write errors or timeouts
- Throws:
StreamNotFoundException
- if the RA did not initialise properly, or the stream is missing.
-
getFileFormat
CdrFileType getFileFormat() throws StreamNotFoundException
This method is similar togetFileFormat(String streamName)
but is targeted towards the default stream.- Returns:
- the type of CDR file being written.
- Throws:
StreamNotFoundException
- if the RA did not initialise properly, or the default stream is missing.- See Also:
getFileFormat(String)
-
getFileFormat
CdrFileType getFileFormat(String streamName) throws StreamNotFoundException
Get the CDR file format of the given stream that this entity is configured to write.- Parameters:
streamName
- the name of the stream to write to.- Returns:
- the type of CDR file being written.
- Throws:
StreamNotFoundException
- if the RA did not initialise properly, or the stream is missing.
-
-