Interface TrunkGroupId
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface TrunkGroupId extends GroupedAvp
Defines an interface representing the Trunk-Group-ID grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:7.2.237 Trunk-Group-ID AVP The Trunk-Group-ID AVP (AVP code 851) is of type Grouped and identifies the incoming and outgoing PSTN legs. It has the following ABNF grammar: Trunk-Group-ID ::= <AVP Header: 851> [ Incoming-Trunk-Group-ID ] [ Outgoing-Trunk-Group-ID ]
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 DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.String
getIncomingTrunkGroupId()
Returns the value of the Incoming-Trunk-Group-ID AVP, of type UTF8String.String
getOutgoingTrunkGroupId()
Returns the value of the Outgoing-Trunk-Group-ID AVP, of type UTF8String.boolean
hasIncomingTrunkGroupId()
Returns true if the Incoming-Trunk-Group-ID AVP is present in the Trunk-Group-ID AVP.boolean
hasOutgoingTrunkGroupId()
Returns true if the Outgoing-Trunk-Group-ID AVP is present in the Trunk-Group-ID AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Trunk-Group-ID AVP.void
removeIncomingTrunkGroupId()
Removes the Incoming-Trunk-Group-ID AVP from the Trunk-Group-ID AVP.void
removeOutgoingTrunkGroupId()
Removes the Outgoing-Trunk-Group-ID AVP from the Trunk-Group-ID AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setIncomingTrunkGroupId(String incomingTrunkGroupId)
Sets the value of the Incoming-Trunk-Group-ID AVP, of type UTF8String.void
setOutgoingTrunkGroupId(String outgoingTrunkGroupId)
Sets the value of the Outgoing-Trunk-Group-ID AVP, of type UTF8String.-
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
-
hasIncomingTrunkGroupId
boolean hasIncomingTrunkGroupId()
Returns true if the Incoming-Trunk-Group-ID AVP is present in the Trunk-Group-ID AVP.
-
getIncomingTrunkGroupId
String getIncomingTrunkGroupId()
Returns the value of the Incoming-Trunk-Group-ID AVP, of type UTF8String.- Returns:
- the value of the Incoming-Trunk-Group-ID AVP, or null if it has not been set.
-
setIncomingTrunkGroupId
void setIncomingTrunkGroupId(String incomingTrunkGroupId)
Sets the value of the Incoming-Trunk-Group-ID AVP, of type UTF8String.- Throws:
NullPointerException
- ifincomingTrunkGroupId
isnull
.
-
removeIncomingTrunkGroupId
void removeIncomingTrunkGroupId()
Removes the Incoming-Trunk-Group-ID AVP from the Trunk-Group-ID AVP. If the Incoming-Trunk-Group-ID AVP is not present, this method returns silently.
-
hasOutgoingTrunkGroupId
boolean hasOutgoingTrunkGroupId()
Returns true if the Outgoing-Trunk-Group-ID AVP is present in the Trunk-Group-ID AVP.
-
getOutgoingTrunkGroupId
String getOutgoingTrunkGroupId()
Returns the value of the Outgoing-Trunk-Group-ID AVP, of type UTF8String.- Returns:
- the value of the Outgoing-Trunk-Group-ID AVP, or null if it has not been set.
-
setOutgoingTrunkGroupId
void setOutgoingTrunkGroupId(String outgoingTrunkGroupId)
Sets the value of the Outgoing-Trunk-Group-ID AVP, of type UTF8String.- Throws:
NullPointerException
- ifoutgoingTrunkGroupId
isnull
.
-
removeOutgoingTrunkGroupId
void removeOutgoingTrunkGroupId()
Removes the Outgoing-Trunk-Group-ID AVP from the Trunk-Group-ID AVP. If the Outgoing-Trunk-Group-ID 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 Trunk-Group-ID 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 Trunk-Group-ID 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 Trunk-Group-ID AVP. If no extension AVPs are present, this method returns silently.
-
-