Interface ChargingRuleInstall
-
- All Superinterfaces:
Cloneable,DiameterAvp,GroupedAvp
public interface ChargingRuleInstall extends GroupedAvp
Defines an interface representing the Charging-Rule-Install grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V11.9.0) specification:5.3.2 Charging-Rule-Install The Charging-Rule-Install AVP (AVP code 1001) is of type Grouped, and it is used to activate, install or modify PCC rules as instructed from the PCRF to the PCEF. For installing a new PCC rule or modifying a PCC rule already installed, Charging-Rule-Definition AVP shall be used. For activating a specific PCC rule predefined at the PCEF, Charging-Rule-Name AVP shall be used as a reference for that PCC rule. The Charging-Rule-Base-Name AVP is a reference that may be used for activating a group of PCC rules predefined at the PCEF. For GPRS scenarios where the bearer binding is performed by the PCRF, the Bearer Identifier AVP shall be included as part of Charging-Rule-Install AVP. If present within Charging-Rule-Install AVP, the Bearer-Identifier AVP indicates that the PCC rules within this Charging-Rule-Install AVP shall be installed or activated within the IP CAN bearer identified by the Bearer-Identifier AVP. If no Bearer-Identifier AVP is included within the Charging-Rule-Install AVP, the PCEF shall select an IP CAN bearer for each of the PCC rules within this Charging-Rule-Install AVP, were the PCC rule is installed or activated. If Rule-Activation-Time or Rule-Deactivation-Time is specified then it applies to all the PCC rules within the Charging-Rule-Install AVP. If Resource-Allocation-Notification AVP is included then it applies to all the rules within the Charging-Rule-Install AVP. If a Charging-Rule-Install AVP does not include the Resource-Allocation-Notification AVP, the resource allocation shall not be notified by the PCEF even if this AVP was present in previous installations of the same rule. If the Charging-Correlation-Indicator AVP is included within the Charging-Rule-Install AVP, it indicates that the PCEF shall provide the assigned access network charging identifier for the dynamic PCC Rules that are provided in the Charging-Rule-Definition AVP(s) within the Access-Network-Charging-Identifier-Gx AVP. It has the following ABNF grammar: <Charging-Rule-Install> ::= < AVP Header: 1001 > *[ Charging-Rule-Definition ] *[ Charging-Rule-Name ] *[ Charging-Rule-Base-Name ] [ Bearer-Identifier ] [ Rule-Activation-Time ] [ Rule-Deactivation-Time ] [ Resource-Allocation-Notification ] [ Charging-Correlation-Indicator ] *[ AVP ]
-
-
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 byte[]getBearerIdentifier()Returns the value of the Bearer-Identifier AVP, of type OctetString.ChargingCorrelationIndicatorgetChargingCorrelationIndicator()Returns the value of the Charging-Correlation-Indicator AVP, of type Enumerated.String[]getChargingRuleBaseNames()Returns the set of Charging-Rule-Base-Name AVPs.ChargingRuleDefinition[]getChargingRuleDefinitions()Returns the set of Charging-Rule-Definition AVPs.byte[][]getChargingRuleNames()Returns the set of Charging-Rule-Name AVPs.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.ResourceAllocationNotificationgetResourceAllocationNotification()Returns the value of the Resource-Allocation-Notification AVP, of type Enumerated.DategetRuleActivationTime()Returns the value of the Rule-Activation-Time AVP, of type Time.DategetRuleDeactivationTime()Returns the value of the Rule-Deactivation-Time AVP, of type Time.booleanhasBearerIdentifier()Returns true if the Bearer-Identifier AVP is present in the Charging-Rule-Install AVP.booleanhasChargingCorrelationIndicator()Returns true if the Charging-Correlation-Indicator AVP is present in the Charging-Rule-Install AVP.booleanhasResourceAllocationNotification()Returns true if the Resource-Allocation-Notification AVP is present in the Charging-Rule-Install AVP.booleanhasRuleActivationTime()Returns true if the Rule-Activation-Time AVP is present in the Charging-Rule-Install AVP.booleanhasRuleDeactivationTime()Returns true if the Rule-Deactivation-Time AVP is present in the Charging-Rule-Install AVP.voidremoveBearerIdentifier()Removes the Bearer-Identifier AVP from the Charging-Rule-Install AVP.voidremoveChargingCorrelationIndicator()Removes the Charging-Correlation-Indicator AVP from the Charging-Rule-Install AVP.voidremoveChargingRuleBaseNames()Removes all Charging-Rule-Base-Name AVPs from the Charging-Rule-Install AVP.voidremoveChargingRuleDefinitions()Removes all Charging-Rule-Definition AVPs from the Charging-Rule-Install AVP.voidremoveChargingRuleNames()Removes all Charging-Rule-Name AVPs from the Charging-Rule-Install AVP.voidremoveExtensionAvps()Removes all extension AVPs from the Charging-Rule-Install AVP.voidremoveResourceAllocationNotification()Removes the Resource-Allocation-Notification AVP from the Charging-Rule-Install AVP.voidremoveRuleActivationTime()Removes the Rule-Activation-Time AVP from the Charging-Rule-Install AVP.voidremoveRuleDeactivationTime()Removes the Rule-Deactivation-Time AVP from the Charging-Rule-Install AVP.voidsetBearerIdentifier(byte[] bearerIdentifier)Sets the value of the Bearer-Identifier AVP, of type OctetString.voidsetChargingCorrelationIndicator(ChargingCorrelationIndicator chargingCorrelationIndicator)Sets the value of the Charging-Correlation-Indicator AVP, of type Enumerated.voidsetChargingRuleBaseName(String chargingRuleBaseName)Sets a single Charging-Rule-Base-Name AVP in the Charging-Rule-Install AVP, of type UTF8String.voidsetChargingRuleBaseNames(String[] chargingRuleBaseNames)Sets the set of Charging-Rule-Base-Name AVPs, with all the values in the given array.voidsetChargingRuleDefinition(ChargingRuleDefinition chargingRuleDefinition)Sets a single Charging-Rule-Definition AVP in the Charging-Rule-Install AVP, of type Grouped.voidsetChargingRuleDefinitions(ChargingRuleDefinition[] chargingRuleDefinitions)Sets the set of Charging-Rule-Definition AVPs, with all the values in the given array.voidsetChargingRuleName(byte[] chargingRuleName)Sets a single Charging-Rule-Name AVP in the Charging-Rule-Install AVP, of type OctetString.voidsetChargingRuleNames(byte[][] chargingRuleNames)Sets the set of Charging-Rule-Name 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.voidsetResourceAllocationNotification(ResourceAllocationNotification resourceAllocationNotification)Sets the value of the Resource-Allocation-Notification AVP, of type Enumerated.voidsetRuleActivationTime(Date ruleActivationTime)Sets the value of the Rule-Activation-Time AVP, of type Time.voidsetRuleDeactivationTime(Date ruleDeactivationTime)Sets the value of the Rule-Deactivation-Time AVP, of type Time.-
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
-
getChargingRuleDefinitions
ChargingRuleDefinition[] getChargingRuleDefinitions()
Returns the set of Charging-Rule-Definition AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Install AVP. A return value of null implies that no Charging-Rule-Definition AVPs have been set. The elements in the given array are ChargingRuleDefinition objects.
-
setChargingRuleDefinition
void setChargingRuleDefinition(ChargingRuleDefinition chargingRuleDefinition)
Sets a single Charging-Rule-Definition AVP in the Charging-Rule-Install AVP, of type Grouped.- Throws:
NullPointerException- ifchargingRuleDefinitionisnull.
-
setChargingRuleDefinitions
void setChargingRuleDefinitions(ChargingRuleDefinition[] chargingRuleDefinitions)
Sets the set of Charging-Rule-Definition AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Install 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 getChargingRuleDefinitions() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifchargingRuleDefinitionsisnull.
-
removeChargingRuleDefinitions
void removeChargingRuleDefinitions()
Removes all Charging-Rule-Definition AVPs from the Charging-Rule-Install AVP. If no Charging-Rule-Definition AVPs are present, this method returns silently.
-
getChargingRuleNames
byte[][] getChargingRuleNames()
Returns the set of Charging-Rule-Name AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Install AVP. A return value of null implies that no Charging-Rule-Name AVPs have been set. The elements in the given array are byte[] objects.
-
setChargingRuleName
void setChargingRuleName(byte[] chargingRuleName)
Sets a single Charging-Rule-Name AVP in the Charging-Rule-Install AVP, of type OctetString.- Throws:
NullPointerException- ifchargingRuleNameisnull.
-
setChargingRuleNames
void setChargingRuleNames(byte[][] chargingRuleNames)
Sets the set of Charging-Rule-Name AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Install 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 getChargingRuleNames() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifchargingRuleNamesisnull.
-
removeChargingRuleNames
void removeChargingRuleNames()
Removes all Charging-Rule-Name AVPs from the Charging-Rule-Install AVP. If no Charging-Rule-Name AVPs are present, this method returns silently.
-
getChargingRuleBaseNames
String[] getChargingRuleBaseNames()
Returns the set of Charging-Rule-Base-Name AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Install AVP. A return value of null implies that no Charging-Rule-Base-Name AVPs have been set. The elements in the given array are String objects.
-
setChargingRuleBaseName
void setChargingRuleBaseName(String chargingRuleBaseName)
Sets a single Charging-Rule-Base-Name AVP in the Charging-Rule-Install AVP, of type UTF8String.- Throws:
NullPointerException- ifchargingRuleBaseNameisnull.
-
setChargingRuleBaseNames
void setChargingRuleBaseNames(String[] chargingRuleBaseNames)
Sets the set of Charging-Rule-Base-Name AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Install 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 getChargingRuleBaseNames() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifchargingRuleBaseNamesisnull.
-
removeChargingRuleBaseNames
void removeChargingRuleBaseNames()
Removes all Charging-Rule-Base-Name AVPs from the Charging-Rule-Install AVP. If no Charging-Rule-Base-Name AVPs are present, this method returns silently.
-
hasBearerIdentifier
boolean hasBearerIdentifier()
Returns true if the Bearer-Identifier AVP is present in the Charging-Rule-Install AVP.
-
getBearerIdentifier
byte[] getBearerIdentifier()
Returns the value of the Bearer-Identifier AVP, of type OctetString.- Returns:
- the value of the Bearer-Identifier AVP, or null if it has not been set.
-
setBearerIdentifier
void setBearerIdentifier(byte[] bearerIdentifier)
Sets the value of the Bearer-Identifier AVP, of type OctetString.- Throws:
NullPointerException- ifbearerIdentifierisnull.
-
removeBearerIdentifier
void removeBearerIdentifier()
Removes the Bearer-Identifier AVP from the Charging-Rule-Install AVP. If the Bearer-Identifier AVP is not present, this method returns silently.
-
hasRuleActivationTime
boolean hasRuleActivationTime()
Returns true if the Rule-Activation-Time AVP is present in the Charging-Rule-Install AVP.
-
getRuleActivationTime
Date getRuleActivationTime()
Returns the value of the Rule-Activation-Time AVP, of type Time.- Returns:
- the value of the Rule-Activation-Time AVP, or null if it has not been set.
-
setRuleActivationTime
void setRuleActivationTime(Date ruleActivationTime)
Sets the value of the Rule-Activation-Time AVP, of type Time.- Throws:
NullPointerException- ifruleActivationTimeisnull.
-
removeRuleActivationTime
void removeRuleActivationTime()
Removes the Rule-Activation-Time AVP from the Charging-Rule-Install AVP. If the Rule-Activation-Time AVP is not present, this method returns silently.
-
hasRuleDeactivationTime
boolean hasRuleDeactivationTime()
Returns true if the Rule-Deactivation-Time AVP is present in the Charging-Rule-Install AVP.
-
getRuleDeactivationTime
Date getRuleDeactivationTime()
Returns the value of the Rule-Deactivation-Time AVP, of type Time.- Returns:
- the value of the Rule-Deactivation-Time AVP, or null if it has not been set.
-
setRuleDeactivationTime
void setRuleDeactivationTime(Date ruleDeactivationTime)
Sets the value of the Rule-Deactivation-Time AVP, of type Time.- Throws:
NullPointerException- ifruleDeactivationTimeisnull.
-
removeRuleDeactivationTime
void removeRuleDeactivationTime()
Removes the Rule-Deactivation-Time AVP from the Charging-Rule-Install AVP. If the Rule-Deactivation-Time AVP is not present, this method returns silently.
-
hasResourceAllocationNotification
boolean hasResourceAllocationNotification()
Returns true if the Resource-Allocation-Notification AVP is present in the Charging-Rule-Install AVP.
-
getResourceAllocationNotification
ResourceAllocationNotification getResourceAllocationNotification()
Returns the value of the Resource-Allocation-Notification AVP, of type Enumerated.- Returns:
- the value of the Resource-Allocation-Notification AVP, or null if it has not been set.
-
setResourceAllocationNotification
void setResourceAllocationNotification(ResourceAllocationNotification resourceAllocationNotification)
Sets the value of the Resource-Allocation-Notification AVP, of type Enumerated.- Throws:
NullPointerException- ifresourceAllocationNotificationisnull.
-
removeResourceAllocationNotification
void removeResourceAllocationNotification()
Removes the Resource-Allocation-Notification AVP from the Charging-Rule-Install AVP. If the Resource-Allocation-Notification AVP is not present, this method returns silently.
-
hasChargingCorrelationIndicator
boolean hasChargingCorrelationIndicator()
Returns true if the Charging-Correlation-Indicator AVP is present in the Charging-Rule-Install AVP.
-
getChargingCorrelationIndicator
ChargingCorrelationIndicator getChargingCorrelationIndicator()
Returns the value of the Charging-Correlation-Indicator AVP, of type Enumerated.- Returns:
- the value of the Charging-Correlation-Indicator AVP, or null if it has not been set.
-
setChargingCorrelationIndicator
void setChargingCorrelationIndicator(ChargingCorrelationIndicator chargingCorrelationIndicator)
Sets the value of the Charging-Correlation-Indicator AVP, of type Enumerated.- Throws:
NullPointerException- ifchargingCorrelationIndicatorisnull.
-
removeChargingCorrelationIndicator
void removeChargingCorrelationIndicator()
Removes the Charging-Correlation-Indicator AVP from the Charging-Rule-Install AVP. If the Charging-Correlation-Indicator AVP is not 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 Charging-Rule-Install 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 Charging-Rule-Install 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 Charging-Rule-Install AVP. If no extension AVPs are present, this method returns silently.
-
-