Interface UsedServiceUnit
-
- All Superinterfaces:
Cloneable,DiameterAvp,GroupedAvp
public interface UsedServiceUnit extends GroupedAvp
Defines an interface representing the Used-Service-Unit grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:7.1.9 Used-Service-Unit AVP The Used-Service-Unit AVP (AVP code 446) is of type grouped as specified in IETF RFC 4006 [402]. It contains additional 3GPP specific charging parameters. It has the following ABNF grammar: Used-Service-Unit ::= < AVP Header: 446 > [ Reporting-Reason ] [ Tariff-Change-Usage ] [ CC-Time ] [ CC-Total-Octets ] [ CC-Input-Octets ] [ CC-Output-Octets ] [ CC-Service-Specific-Units ] *[ Event-Charging-Timestamp ]Note:
The support for extension AVPs is present even thou the ABNF grammar for this AVP does not contain the "* [ AVP ]" line. Be aware that adding any extension AVPs may result in interoperability problems with products that strongly validate the incoming diameter message for it's adherence to the specification.
-
-
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 longgetCcInputOctets()Returns the value of the CC-Input-Octets AVP, of type Unsigned64.longgetCcOutputOctets()Returns the value of the CC-Output-Octets AVP, of type Unsigned64.longgetCcServiceSpecificUnits()Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64.longgetCcTime()Returns the value of the CC-Time AVP, of type Unsigned32.longgetCcTotalOctets()Returns the value of the CC-Total-Octets AVP, of type Unsigned64.Date[]getEventChargingTimestamps()Returns the set of Event-Charging-Timestamp AVPs.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.ReportingReasongetReportingReason()Returns the value of the Reporting-Reason AVP, of type Enumerated.TariffChangeUsagegetTariffChangeUsage()Returns the value of the Tariff-Change-Usage AVP, of type Enumerated.booleanhasCcInputOctets()Returns true if the CC-Input-Octets AVP is present in the Used-Service-Unit AVP.booleanhasCcOutputOctets()Returns true if the CC-Output-Octets AVP is present in the Used-Service-Unit AVP.booleanhasCcServiceSpecificUnits()Returns true if the CC-Service-Specific-Units AVP is present in the Used-Service-Unit AVP.booleanhasCcTime()Returns true if the CC-Time AVP is present in the Used-Service-Unit AVP.booleanhasCcTotalOctets()Returns true if the CC-Total-Octets AVP is present in the Used-Service-Unit AVP.booleanhasReportingReason()Returns true if the Reporting-Reason AVP is present in the Used-Service-Unit AVP.booleanhasTariffChangeUsage()Returns true if the Tariff-Change-Usage AVP is present in the Used-Service-Unit AVP.voidremoveCcInputOctets()Removes the CC-Input-Octets AVP from the Used-Service-Unit AVP.voidremoveCcOutputOctets()Removes the CC-Output-Octets AVP from the Used-Service-Unit AVP.voidremoveCcServiceSpecificUnits()Removes the CC-Service-Specific-Units AVP from the Used-Service-Unit AVP.voidremoveCcTime()Removes the CC-Time AVP from the Used-Service-Unit AVP.voidremoveCcTotalOctets()Removes the CC-Total-Octets AVP from the Used-Service-Unit AVP.voidremoveEventChargingTimestamps()Removes all Event-Charging-Timestamp AVPs from the Used-Service-Unit AVP.voidremoveExtensionAvps()Removes all extension AVPs from the Used-Service-Unit AVP.voidremoveReportingReason()Removes the Reporting-Reason AVP from the Used-Service-Unit AVP.voidremoveTariffChangeUsage()Removes the Tariff-Change-Usage AVP from the Used-Service-Unit AVP.voidsetCcInputOctets(long ccInputOctets)Sets the value of the CC-Input-Octets AVP, of type Unsigned64.voidsetCcOutputOctets(long ccOutputOctets)Sets the value of the CC-Output-Octets AVP, of type Unsigned64.voidsetCcServiceSpecificUnits(long ccServiceSpecificUnits)Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.voidsetCcTime(long ccTime)Sets the value of the CC-Time AVP, of type Unsigned32.voidsetCcTotalOctets(long ccTotalOctets)Sets the value of the CC-Total-Octets AVP, of type Unsigned64.voidsetEventChargingTimestamp(Date eventChargingTimestamp)Sets a single Event-Charging-Timestamp AVP in the Used-Service-Unit AVP, of type Time.voidsetEventChargingTimestamps(Date[] eventChargingTimestamps)Sets the set of Event-Charging-Timestamp AVPs, with all the values in the given array.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetReportingReason(ReportingReason reportingReason)Sets the value of the Reporting-Reason AVP, of type Enumerated.voidsetTariffChangeUsage(TariffChangeUsage tariffChangeUsage)Sets the value of the Tariff-Change-Usage AVP, of type Enumerated.-
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
-
hasReportingReason
boolean hasReportingReason()
Returns true if the Reporting-Reason AVP is present in the Used-Service-Unit AVP.
-
getReportingReason
ReportingReason getReportingReason()
Returns the value of the Reporting-Reason AVP, of type Enumerated.- Returns:
- the value of the Reporting-Reason AVP, or null if it has not been set.
-
setReportingReason
void setReportingReason(ReportingReason reportingReason)
Sets the value of the Reporting-Reason AVP, of type Enumerated.- Throws:
NullPointerException- ifreportingReasonisnull.
-
removeReportingReason
void removeReportingReason()
Removes the Reporting-Reason AVP from the Used-Service-Unit AVP. If the Reporting-Reason AVP is not present, this method returns silently.
-
hasTariffChangeUsage
boolean hasTariffChangeUsage()
Returns true if the Tariff-Change-Usage AVP is present in the Used-Service-Unit AVP.
-
getTariffChangeUsage
TariffChangeUsage getTariffChangeUsage()
Returns the value of the Tariff-Change-Usage AVP, of type Enumerated.- Returns:
- the value of the Tariff-Change-Usage AVP, or null if it has not been set.
-
setTariffChangeUsage
void setTariffChangeUsage(TariffChangeUsage tariffChangeUsage)
Sets the value of the Tariff-Change-Usage AVP, of type Enumerated.- Throws:
NullPointerException- iftariffChangeUsageisnull.
-
removeTariffChangeUsage
void removeTariffChangeUsage()
Removes the Tariff-Change-Usage AVP from the Used-Service-Unit AVP. If the Tariff-Change-Usage AVP is not present, this method returns silently.
-
hasCcTime
boolean hasCcTime()
Returns true if the CC-Time AVP is present in the Used-Service-Unit AVP.
-
getCcTime
long getCcTime()
Returns the value of the CC-Time AVP, of type Unsigned32. UsehasCcTime()to check the existence of this AVP.- Returns:
- the value of the CC-Time AVP
- Throws:
IllegalStateException- if the CC-Time AVP has not been set.
-
setCcTime
void setCcTime(long ccTime)
Sets the value of the CC-Time AVP, of type Unsigned32.
-
removeCcTime
void removeCcTime()
Removes the CC-Time AVP from the Used-Service-Unit AVP. If the CC-Time AVP is not present, this method returns silently.
-
hasCcTotalOctets
boolean hasCcTotalOctets()
Returns true if the CC-Total-Octets AVP is present in the Used-Service-Unit AVP.
-
getCcTotalOctets
long getCcTotalOctets()
Returns the value of the CC-Total-Octets AVP, of type Unsigned64. UsehasCcTotalOctets()to check the existence of this AVP.- Returns:
- the value of the CC-Total-Octets AVP
- Throws:
IllegalStateException- if the CC-Total-Octets AVP has not been set.
-
setCcTotalOctets
void setCcTotalOctets(long ccTotalOctets)
Sets the value of the CC-Total-Octets AVP, of type Unsigned64.
-
removeCcTotalOctets
void removeCcTotalOctets()
Removes the CC-Total-Octets AVP from the Used-Service-Unit AVP. If the CC-Total-Octets AVP is not present, this method returns silently.
-
hasCcInputOctets
boolean hasCcInputOctets()
Returns true if the CC-Input-Octets AVP is present in the Used-Service-Unit AVP.
-
getCcInputOctets
long getCcInputOctets()
Returns the value of the CC-Input-Octets AVP, of type Unsigned64. UsehasCcInputOctets()to check the existence of this AVP.- Returns:
- the value of the CC-Input-Octets AVP
- Throws:
IllegalStateException- if the CC-Input-Octets AVP has not been set.
-
setCcInputOctets
void setCcInputOctets(long ccInputOctets)
Sets the value of the CC-Input-Octets AVP, of type Unsigned64.
-
removeCcInputOctets
void removeCcInputOctets()
Removes the CC-Input-Octets AVP from the Used-Service-Unit AVP. If the CC-Input-Octets AVP is not present, this method returns silently.
-
hasCcOutputOctets
boolean hasCcOutputOctets()
Returns true if the CC-Output-Octets AVP is present in the Used-Service-Unit AVP.
-
getCcOutputOctets
long getCcOutputOctets()
Returns the value of the CC-Output-Octets AVP, of type Unsigned64. UsehasCcOutputOctets()to check the existence of this AVP.- Returns:
- the value of the CC-Output-Octets AVP
- Throws:
IllegalStateException- if the CC-Output-Octets AVP has not been set.
-
setCcOutputOctets
void setCcOutputOctets(long ccOutputOctets)
Sets the value of the CC-Output-Octets AVP, of type Unsigned64.
-
removeCcOutputOctets
void removeCcOutputOctets()
Removes the CC-Output-Octets AVP from the Used-Service-Unit AVP. If the CC-Output-Octets AVP is not present, this method returns silently.
-
hasCcServiceSpecificUnits
boolean hasCcServiceSpecificUnits()
Returns true if the CC-Service-Specific-Units AVP is present in the Used-Service-Unit AVP.
-
getCcServiceSpecificUnits
long getCcServiceSpecificUnits()
Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64. UsehasCcServiceSpecificUnits()to check the existence of this AVP.- Returns:
- the value of the CC-Service-Specific-Units AVP
- Throws:
IllegalStateException- if the CC-Service-Specific-Units AVP has not been set.
-
setCcServiceSpecificUnits
void setCcServiceSpecificUnits(long ccServiceSpecificUnits)
Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.
-
removeCcServiceSpecificUnits
void removeCcServiceSpecificUnits()
Removes the CC-Service-Specific-Units AVP from the Used-Service-Unit AVP. If the CC-Service-Specific-Units AVP is not present, this method returns silently.
-
getEventChargingTimestamps
Date[] getEventChargingTimestamps()
Returns the set of Event-Charging-Timestamp AVPs. The returned array contains the AVPs in the order they appear in the Used-Service-Unit AVP. A return value of null implies that no Event-Charging-Timestamp AVPs have been set. The elements in the given array are Date objects.
-
setEventChargingTimestamp
void setEventChargingTimestamp(Date eventChargingTimestamp)
Sets a single Event-Charging-Timestamp AVP in the Used-Service-Unit AVP, of type Time.- Throws:
NullPointerException- ifeventChargingTimestampisnull.
-
setEventChargingTimestamps
void setEventChargingTimestamps(Date[] eventChargingTimestamps)
Sets the set of Event-Charging-Timestamp AVPs, with all the values in the given array. The AVPs will be added to the Used-Service-Unit 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 getEventChargingTimestamps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifeventChargingTimestampsisnull.
-
removeEventChargingTimestamps
void removeEventChargingTimestamps()
Removes all Event-Charging-Timestamp AVPs from the Used-Service-Unit AVP. If no Event-Charging-Timestamp 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 Used-Service-Unit 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 Used-Service-Unit 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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Used-Service-Unit AVP. If no extension AVPs are present, this method returns silently.
-
-