Interface RoutingRuleDefinition
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface RoutingRuleDefinition extends GroupedAvp
Defines an interface representing the Routing-Rule-Definition grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V10.1.0) specification:5.3.70 Routing-Rule-Definition The Routing-Rule-Definition AVP (AVP code 1076) is of type Grouped, and it defines the IP flow mobility routing rule sent by the PCEF to the PCRF. The Routing-Rule-Identifier AVP uniquely identifies the IP flow mobility routing rule and it is used to reference to a IP flow mobility routing rule in communication between the PCEF and the PCRF within one IP CAN session. The Routing-IP-Address AVP identifies the IP address to be used for transporting for service data flows matching the IP flow mobility routing rule. The IP address may be a care-of-address or the home address. The Routing-Filter AVP(s) contains detailed description of routing filter(s) for determining the service data flows that belong to the IP flow mobility routing rule. AVP Format: Routing-Rule-Definition ::= < AVP Header: 1076 > { Routing-Rule-Identifier } *[ Routing-Filter ] [ Precedence ] [ Routing-IP-Address ] *[ 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 DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.long
getPrecedence()
Returns the value of the Precedence AVP, of type Unsigned32.RoutingFilter[]
getRoutingFilters()
Returns the set of Routing-Filter AVPs.Address
getRoutingIpAddress()
Returns the value of the Routing-IP-Address AVP, of type Address.byte[]
getRoutingRuleIdentifier()
Returns the value of the Routing-Rule-Identifier AVP, of type OctetString.boolean
hasPrecedence()
Returns true if the Precedence AVP is present in the Routing-Rule-Definition AVP.boolean
hasRoutingIpAddress()
Returns true if the Routing-IP-Address AVP is present in the Routing-Rule-Definition AVP.boolean
hasRoutingRuleIdentifier()
Returns true if the Routing-Rule-Identifier AVP is present in the Routing-Rule-Definition AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Routing-Rule-Definition AVP.void
removePrecedence()
Removes the Precedence AVP from the Routing-Rule-Definition AVP.void
removeRoutingFilters()
Removes all Routing-Filter AVPs from the Routing-Rule-Definition AVP.void
removeRoutingIpAddress()
Removes the Routing-IP-Address AVP from the Routing-Rule-Definition AVP.void
removeRoutingRuleIdentifier()
Removes the Routing-Rule-Identifier AVP from the Routing-Rule-Definition AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setPrecedence(long precedence)
Sets the value of the Precedence AVP, of type Unsigned32.void
setRoutingFilter(RoutingFilter routingFilter)
Sets a single Routing-Filter AVP in the Routing-Rule-Definition AVP, of type Grouped.void
setRoutingFilters(RoutingFilter[] routingFilters)
Sets the set of Routing-Filter AVPs, with all the values in the given array.void
setRoutingIpAddress(Address routingIpAddress)
Sets the value of the Routing-IP-Address AVP, of type Address.void
setRoutingRuleIdentifier(byte[] routingRuleIdentifier)
Sets the value of the Routing-Rule-Identifier AVP, of type OctetString.-
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
-
hasRoutingRuleIdentifier
boolean hasRoutingRuleIdentifier()
Returns true if the Routing-Rule-Identifier AVP is present in the Routing-Rule-Definition AVP.
-
getRoutingRuleIdentifier
byte[] getRoutingRuleIdentifier()
Returns the value of the Routing-Rule-Identifier AVP, of type OctetString.- Returns:
- the value of the Routing-Rule-Identifier AVP, or null if it has not been set.
-
setRoutingRuleIdentifier
void setRoutingRuleIdentifier(byte[] routingRuleIdentifier)
Sets the value of the Routing-Rule-Identifier AVP, of type OctetString.- Throws:
NullPointerException
- ifroutingRuleIdentifier
isnull
.
-
removeRoutingRuleIdentifier
void removeRoutingRuleIdentifier()
Removes the Routing-Rule-Identifier AVP from the Routing-Rule-Definition AVP. If the Routing-Rule-Identifier AVP is not present, this method returns silently.
-
getRoutingFilters
RoutingFilter[] getRoutingFilters()
Returns the set of Routing-Filter AVPs. The returned array contains the AVPs in the order they appear in the Routing-Rule-Definition AVP. A return value of null implies that no Routing-Filter AVPs have been set. The elements in the given array are RoutingFilter objects.
-
setRoutingFilter
void setRoutingFilter(RoutingFilter routingFilter)
Sets a single Routing-Filter AVP in the Routing-Rule-Definition AVP, of type Grouped.- Throws:
NullPointerException
- ifroutingFilter
isnull
.
-
setRoutingFilters
void setRoutingFilters(RoutingFilter[] routingFilters)
Sets the set of Routing-Filter AVPs, with all the values in the given array. The AVPs will be added to the Routing-Rule-Definition 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 getRoutingFilters() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifroutingFilters
isnull
.
-
removeRoutingFilters
void removeRoutingFilters()
Removes all Routing-Filter AVPs from the Routing-Rule-Definition AVP. If no Routing-Filter AVPs are present, this method returns silently.
-
hasPrecedence
boolean hasPrecedence()
Returns true if the Precedence AVP is present in the Routing-Rule-Definition AVP.
-
getPrecedence
long getPrecedence()
Returns the value of the Precedence AVP, of type Unsigned32. UsehasPrecedence()
to check the existence of this AVP.- Returns:
- the value of the Precedence AVP
- Throws:
IllegalStateException
- if the Precedence AVP has not been set.
-
setPrecedence
void setPrecedence(long precedence)
Sets the value of the Precedence AVP, of type Unsigned32.
-
removePrecedence
void removePrecedence()
Removes the Precedence AVP from the Routing-Rule-Definition AVP. If the Precedence AVP is not present, this method returns silently.
-
hasRoutingIpAddress
boolean hasRoutingIpAddress()
Returns true if the Routing-IP-Address AVP is present in the Routing-Rule-Definition AVP.
-
getRoutingIpAddress
Address getRoutingIpAddress()
Returns the value of the Routing-IP-Address AVP, of type Address.- Returns:
- the value of the Routing-IP-Address AVP, or null if it has not been set.
-
setRoutingIpAddress
void setRoutingIpAddress(Address routingIpAddress)
Sets the value of the Routing-IP-Address AVP, of type Address.- Throws:
NullPointerException
- ifroutingIpAddress
isnull
.
-
removeRoutingIpAddress
void removeRoutingIpAddress()
Removes the Routing-IP-Address AVP from the Routing-Rule-Definition AVP. If the Routing-IP-Address 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 Routing-Rule-Definition 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 Routing-Rule-Definition 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 Routing-Rule-Definition AVP. If no extension AVPs are present, this method returns silently.
-
-