public interface MultipleServicesCreditControl extends GroupedAvp
8.16. Multiple-Services-Credit-Control AVP Multiple-Services-Credit-Control AVP (AVP Code 456) is of type Grouped and contains the AVPs related to the independent credit- control of multiple services feature. Note that each instance of this AVP carries units related to one or more services or related to a single rating group. The Service-Identifier and the Rating-Group AVPs are used to associate the granted units to a given service or rating group. If both the Service-Identifier and the Rating-Group AVPs are included, the target of the service units is always the service(s) indicated by the value of the Service-Identifier AVP(s). If only the Rating- Group-Id AVP is present, the Multiple-Services-Credit-Control AVP relates to all the services that belong to the specified rating group. The G-S-U-Pool-Reference AVP allows the server to specify a G-S-U- Pool-Identifier identifying a credit pool within which the units of the specified type are considered pooled. If a G-S-U-Pool-Reference AVP is present, then actual service units of the specified type MUST also be present. For example, if the G-S-U-Pool-Reference AVP specifies Unit-Type TIME, then the CC-Time AVP MUST be present. The Requested-Service-Unit AVP MAY contain the amount of requested service units or the requested monetary value. It MUST be present in the initial interrogation and within the intermediate interrogations in which new quota is requested. If the credit-control client does not include the Requested-Service-Unit AVP in a request command, because for instance, it has determined that the end-user terminated the service, the server MUST debit the used amount from the user's account but MUST NOT return a new quota in the corresponding answer. The Validity-Time, Result-Code, and Final-Unit-Indication AVPs MAY be present in an answer command as defined in sections 5.1.2 and 5.6 for the graceful service termination. When both the Tariff-Time-Change and Tariff-Change-Usage AVPs are present, the server MUST include two separate instances of the Multiple-Services-Credit-Control AVP with the Granted-Service-Unit AVP associated to the same service-identifier and/or rating-group. Where the two quotas are associated to the same pool or to different pools, the credit pooling mechanism defined in section 5.1.2 applies. The Tariff-Change-Usage AVP MUST NOT be included in request commands to report used units before, and after tariff time change the Used- Service-Unit AVP MUST be used. A server not implementing the independent credit-control of multiple services functionality MUST treat the Multiple-Services-Credit- Control AVP as an invalid AVP. The Multiple-Services-Control AVP is defined as follows (per the grouped-avp-def of RFC 3588 [DIAMBASE]): Multiple-Services-Credit-Control ::= < AVP Header: 456 > [ Granted-Service-Unit ] [ Requested-Service-Unit ] *[ Used-Service-Unit ] [ Tariff-Change-Usage ] *[ Service-Identifier ] [ Rating-Group ] *[ G-S-U-Pool-Reference ] [ Validity-Time ] [ Result-Code ] [ Final-Unit-Indication ] *[ AVP ]
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
Modifier and Type | Method and Description |
---|---|
DiameterAvp[] |
getExtensionAvps()
Returns the set of extension AVPs.
|
FinalUnitIndication |
getFinalUnitIndication()
Returns the value of the Final-Unit-Indication AVP, of type Grouped.
|
GrantedServiceUnit |
getGrantedServiceUnit()
Returns the value of the Granted-Service-Unit AVP, of type Grouped.
|
GsuPoolReference[] |
getGsuPoolReferences()
Returns the set of G-S-U-Pool-Reference AVPs.
|
long |
getRatingGroup()
Returns the value of the Rating-Group AVP, of type Unsigned32.
|
RequestedServiceUnit |
getRequestedServiceUnit()
Returns the value of the Requested-Service-Unit AVP, of type Grouped.
|
long |
getResultCode()
Returns the value of the Result-Code AVP, of type Unsigned32.
|
long[] |
getServiceIdentifiers()
Returns the set of Service-Identifier AVPs.
|
TariffChangeUsage |
getTariffChangeUsage()
Returns the value of the Tariff-Change-Usage AVP, of type Enumerated.
|
UsedServiceUnit[] |
getUsedServiceUnits()
Returns the set of Used-Service-Unit AVPs.
|
long |
getValidityTime()
Returns the value of the Validity-Time AVP, of type Unsigned32.
|
boolean |
hasFinalUnitIndication()
Returns true if the Final-Unit-Indication AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasGrantedServiceUnit()
Returns true if the Granted-Service-Unit AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasRatingGroup()
Returns true if the Rating-Group AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasRequestedServiceUnit()
Returns true if the Requested-Service-Unit AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasResultCode()
Returns true if the Result-Code AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasTariffChangeUsage()
Returns true if the Tariff-Change-Usage AVP is present in the Multiple-Services-Credit-Control AVP.
|
boolean |
hasValidityTime()
Returns true if the Validity-Time AVP is present in the Multiple-Services-Credit-Control AVP.
|
void |
removeExtensionAvps()
Removes all extension AVPs from the Multiple-Services-Credit-Control AVP.
|
void |
removeFinalUnitIndication()
Removes the Final-Unit-Indication AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeGrantedServiceUnit()
Removes the Granted-Service-Unit AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeGsuPoolReferences()
Removes all G-S-U-Pool-Reference AVPs from the Multiple-Services-Credit-Control AVP.
|
void |
removeRatingGroup()
Removes the Rating-Group AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeRequestedServiceUnit()
Removes the Requested-Service-Unit AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeResultCode()
Removes the Result-Code AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeServiceIdentifiers()
Removes all Service-Identifier AVPs from the Multiple-Services-Credit-Control AVP.
|
void |
removeTariffChangeUsage()
Removes the Tariff-Change-Usage AVP from the Multiple-Services-Credit-Control AVP.
|
void |
removeUsedServiceUnits()
Removes all Used-Service-Unit AVPs from the Multiple-Services-Credit-Control AVP.
|
void |
removeValidityTime()
Removes the Validity-Time AVP from the Multiple-Services-Credit-Control AVP.
|
void |
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.
|
void |
setFinalUnitIndication(FinalUnitIndication finalUnitIndication)
Sets the value of the Final-Unit-Indication AVP, of type Grouped.
|
void |
setGrantedServiceUnit(GrantedServiceUnit grantedServiceUnit)
Sets the value of the Granted-Service-Unit AVP, of type Grouped.
|
void |
setGsuPoolReference(GsuPoolReference gsuPoolReference)
Sets a single G-S-U-Pool-Reference AVP in the Multiple-Services-Credit-Control AVP, of type Grouped.
|
void |
setGsuPoolReferences(GsuPoolReference[] gsuPoolReferences)
Sets the set of G-S-U-Pool-Reference AVPs, with all the values in the given array.
|
void |
setRatingGroup(long ratingGroup)
Sets the value of the Rating-Group AVP, of type Unsigned32.
|
void |
setRequestedServiceUnit(RequestedServiceUnit requestedServiceUnit)
Sets the value of the Requested-Service-Unit AVP, of type Grouped.
|
void |
setResultCode(long resultCode)
Sets the value of the Result-Code AVP, of type Unsigned32.
|
void |
setServiceIdentifier(long serviceIdentifier)
Sets a single Service-Identifier AVP in the Multiple-Services-Credit-Control AVP, of type Unsigned32.
|
void |
setServiceIdentifiers(long[] serviceIdentifiers)
Sets the set of Service-Identifier AVPs, with all the values in the given array.
|
void |
setTariffChangeUsage(TariffChangeUsage tariffChangeUsage)
Sets the value of the Tariff-Change-Usage AVP, of type Enumerated.
|
void |
setUsedServiceUnit(UsedServiceUnit usedServiceUnit)
Sets a single Used-Service-Unit AVP in the Multiple-Services-Credit-Control AVP, of type Grouped.
|
void |
setUsedServiceUnits(UsedServiceUnit[] usedServiceUnits)
Sets the set of Used-Service-Unit AVPs, with all the values in the given array.
|
void |
setValidityTime(long validityTime)
Sets the value of the Validity-Time AVP, of type Unsigned32.
|
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
boolean hasGrantedServiceUnit()
GrantedServiceUnit getGrantedServiceUnit()
void setGrantedServiceUnit(GrantedServiceUnit grantedServiceUnit)
java.lang.NullPointerException
- if grantedServiceUnit
is null
.void removeGrantedServiceUnit()
boolean hasRequestedServiceUnit()
RequestedServiceUnit getRequestedServiceUnit()
void setRequestedServiceUnit(RequestedServiceUnit requestedServiceUnit)
java.lang.NullPointerException
- if requestedServiceUnit
is null
.void removeRequestedServiceUnit()
UsedServiceUnit[] getUsedServiceUnits()
void setUsedServiceUnit(UsedServiceUnit usedServiceUnit)
java.lang.NullPointerException
- if usedServiceUnit
is null
.void setUsedServiceUnits(UsedServiceUnit[] usedServiceUnits)
java.lang.NullPointerException
- if usedServiceUnits
is null
.void removeUsedServiceUnits()
boolean hasTariffChangeUsage()
TariffChangeUsage getTariffChangeUsage()
void setTariffChangeUsage(TariffChangeUsage tariffChangeUsage)
java.lang.NullPointerException
- if tariffChangeUsage
is null
.void removeTariffChangeUsage()
long[] getServiceIdentifiers()
void setServiceIdentifier(long serviceIdentifier)
void setServiceIdentifiers(long[] serviceIdentifiers)
java.lang.NullPointerException
- if serviceIdentifiers
is null
.void removeServiceIdentifiers()
boolean hasRatingGroup()
long getRatingGroup()
hasRatingGroup()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Rating-Group AVP has not been set.void setRatingGroup(long ratingGroup)
void removeRatingGroup()
GsuPoolReference[] getGsuPoolReferences()
void setGsuPoolReference(GsuPoolReference gsuPoolReference)
java.lang.NullPointerException
- if gsuPoolReference
is null
.void setGsuPoolReferences(GsuPoolReference[] gsuPoolReferences)
java.lang.NullPointerException
- if gsuPoolReferences
is null
.void removeGsuPoolReferences()
boolean hasValidityTime()
long getValidityTime()
hasValidityTime()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Validity-Time AVP has not been set.void setValidityTime(long validityTime)
void removeValidityTime()
boolean hasResultCode()
long getResultCode()
hasResultCode()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Result-Code AVP has not been set.void setResultCode(long resultCode)
void removeResultCode()
boolean hasFinalUnitIndication()
FinalUnitIndication getFinalUnitIndication()
void setFinalUnitIndication(FinalUnitIndication finalUnitIndication)
java.lang.NullPointerException
- if finalUnitIndication
is null
.void removeFinalUnitIndication()
DiameterAvp[] getExtensionAvps()
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
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)java.lang.NullPointerException
- if avps
is null
.void removeExtensionAvps()