Interface OfflineCharging
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface OfflineCharging extends GroupedAvp
Defines an interface representing the Offline-Charging grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V10.0.0) specification:7.2.121 Offline-Charging AVP The Offline-Charging AVP (AVP code 1278) is a grouped AVP, which is used to set the parameters required to control offline charging. It has the following ABNF grammar: Offline-Charging ::= < AVP Header: 1278> [ Quota-Consumption-Time ] [ Time-Quota-Mechanism ] [ Envelope-Reporting ] *[ Multiple-Services-Credit-Control ] *[ AVP ] At most one of Quota-Consumption-Time AVP or Time-Quota-Mechanism AVP shall be present, if individual instances are not included within the Multiple-Services-Credit-Control AVP. The Multiple-Services-Credit-Control AVPs, if present, shall contain the Rating-Group AVP to identify the category, optionally one of Quota-Consumption-Time AVP and Time-Quota-Mechanism AVP, and optionally the Envelope- Reporting AVP. Any values specified in the Offline-Charging AVP take precedence over the configured defaults. The values of the parameters specified at Multiple-Services-Credit-Control level take precedence over the values specified directly at Offline-Charging level. If neither Quota-Consumption-Time AVP nor Time-Quota-Mechanism AVP is included in the Multiple-Services-Credit-Control AVP, then the general reporting requirements dictated by the Quota-Consumption- Time AVP or Time-Quota-Mechanism AVP and Envelope-Reporting AVP directly within the Offline-Charging AVP shall apply.
-
-
Field Summary
-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EnvelopeReporting
getEnvelopeReporting()
Returns the value of the Envelope-Reporting AVP, of type Enumerated.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.MultipleServicesCreditControl[]
getMultipleServicesCreditControls()
Returns the set of Multiple-Services-Credit-Control AVPs.long
getQuotaConsumptionTime()
Returns the value of the Quota-Consumption-Time AVP, of type Unsigned32.TimeQuotaMechanism
getTimeQuotaMechanism()
Returns the value of the Time-Quota-Mechanism AVP, of type Grouped.boolean
hasEnvelopeReporting()
Returns true if the Envelope-Reporting AVP is present in the Offline-Charging AVP.boolean
hasQuotaConsumptionTime()
Returns true if the Quota-Consumption-Time AVP is present in the Offline-Charging AVP.boolean
hasTimeQuotaMechanism()
Returns true if the Time-Quota-Mechanism AVP is present in the Offline-Charging AVP.void
removeEnvelopeReporting()
Removes the Envelope-Reporting AVP from the Offline-Charging AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Offline-Charging AVP.void
removeMultipleServicesCreditControls()
Removes all Multiple-Services-Credit-Control AVPs from the Offline-Charging AVP.void
removeQuotaConsumptionTime()
Removes the Quota-Consumption-Time AVP from the Offline-Charging AVP.void
removeTimeQuotaMechanism()
Removes the Time-Quota-Mechanism AVP from the Offline-Charging AVP.void
setEnvelopeReporting(EnvelopeReporting envelopeReporting)
Sets the value of the Envelope-Reporting AVP, of type Enumerated.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setMultipleServicesCreditControl(MultipleServicesCreditControl multipleServicesCreditControl)
Sets a single Multiple-Services-Credit-Control AVP in the Offline-Charging AVP, of type Grouped.void
setMultipleServicesCreditControls(MultipleServicesCreditControl[] multipleServicesCreditControls)
Sets the set of Multiple-Services-Credit-Control AVPs, with all the values in the given array.void
setQuotaConsumptionTime(long quotaConsumptionTime)
Sets the value of the Quota-Consumption-Time AVP, of type Unsigned32.void
setTimeQuotaMechanism(TimeQuotaMechanism timeQuotaMechanism)
Sets the value of the Time-Quota-Mechanism AVP, of type Grouped.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
Method Detail
-
hasQuotaConsumptionTime
boolean hasQuotaConsumptionTime()
Returns true if the Quota-Consumption-Time AVP is present in the Offline-Charging AVP.
-
getQuotaConsumptionTime
long getQuotaConsumptionTime()
Returns the value of the Quota-Consumption-Time AVP, of type Unsigned32. UsehasQuotaConsumptionTime()
to check the existence of this AVP.- Returns:
- the value of the Quota-Consumption-Time AVP
- Throws:
IllegalStateException
- if the Quota-Consumption-Time AVP has not been set.
-
setQuotaConsumptionTime
void setQuotaConsumptionTime(long quotaConsumptionTime)
Sets the value of the Quota-Consumption-Time AVP, of type Unsigned32.
-
removeQuotaConsumptionTime
void removeQuotaConsumptionTime()
Removes the Quota-Consumption-Time AVP from the Offline-Charging AVP. If the Quota-Consumption-Time AVP is not present, this method returns silently.
-
hasTimeQuotaMechanism
boolean hasTimeQuotaMechanism()
Returns true if the Time-Quota-Mechanism AVP is present in the Offline-Charging AVP.
-
getTimeQuotaMechanism
TimeQuotaMechanism getTimeQuotaMechanism()
Returns the value of the Time-Quota-Mechanism AVP, of type Grouped.- Returns:
- the value of the Time-Quota-Mechanism AVP, or null if it has not been set.
-
setTimeQuotaMechanism
void setTimeQuotaMechanism(TimeQuotaMechanism timeQuotaMechanism)
Sets the value of the Time-Quota-Mechanism AVP, of type Grouped.- Throws:
NullPointerException
- iftimeQuotaMechanism
isnull
.
-
removeTimeQuotaMechanism
void removeTimeQuotaMechanism()
Removes the Time-Quota-Mechanism AVP from the Offline-Charging AVP. If the Time-Quota-Mechanism AVP is not present, this method returns silently.
-
hasEnvelopeReporting
boolean hasEnvelopeReporting()
Returns true if the Envelope-Reporting AVP is present in the Offline-Charging AVP.
-
getEnvelopeReporting
EnvelopeReporting getEnvelopeReporting()
Returns the value of the Envelope-Reporting AVP, of type Enumerated.- Returns:
- the value of the Envelope-Reporting AVP, or null if it has not been set.
-
setEnvelopeReporting
void setEnvelopeReporting(EnvelopeReporting envelopeReporting)
Sets the value of the Envelope-Reporting AVP, of type Enumerated.- Throws:
NullPointerException
- ifenvelopeReporting
isnull
.
-
removeEnvelopeReporting
void removeEnvelopeReporting()
Removes the Envelope-Reporting AVP from the Offline-Charging AVP. If the Envelope-Reporting AVP is not present, this method returns silently.
-
getMultipleServicesCreditControls
MultipleServicesCreditControl[] getMultipleServicesCreditControls()
Returns the set of Multiple-Services-Credit-Control AVPs. The returned array contains the AVPs in the order they appear in the Offline-Charging AVP. A return value of null implies that no Multiple-Services-Credit-Control AVPs have been set. The elements in the given array are MultipleServicesCreditControl objects.
-
setMultipleServicesCreditControl
void setMultipleServicesCreditControl(MultipleServicesCreditControl multipleServicesCreditControl)
Sets a single Multiple-Services-Credit-Control AVP in the Offline-Charging AVP, of type Grouped.- Throws:
NullPointerException
- ifmultipleServicesCreditControl
isnull
.
-
setMultipleServicesCreditControls
void setMultipleServicesCreditControls(MultipleServicesCreditControl[] multipleServicesCreditControls)
Sets the set of Multiple-Services-Credit-Control AVPs, with all the values in the given array. The AVPs will be added to the Offline-Charging AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getMultipleServicesCreditControls() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifmultipleServicesCreditControls
isnull
.
-
removeMultipleServicesCreditControls
void removeMultipleServicesCreditControls()
Removes all Multiple-Services-Credit-Control AVPs from the Offline-Charging AVP. If no Multiple-Services-Credit-Control AVPs are present, this method returns silently.
-
getExtensionAvps
DiameterAvp[] getExtensionAvps()
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Offline-Charging AVP. A return value of null implies that no extensions AVPs have been set.
-
setExtensionAvps
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Offline-Charging AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)NullPointerException
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Offline-Charging AVP. If no extension AVPs are present, this method returns silently.
-
-