Interface VendorSpecificApplicationId
-
- All Superinterfaces:
Cloneable,DiameterAvp,GroupedAvp
public interface VendorSpecificApplicationId extends GroupedAvp
Defines an interface representing the Vendor-Specific-Application-Id grouped AVP type. From the Diameter Base Protocol (rfc6733.txt) specification:6.11. Vendor-Specific-Application-Id AVP The Vendor-Specific-Application-Id AVP (AVP Code 260) is of type Grouped and is used to advertise support of a vendor-specific Diameter application. Exactly one instance of either Auth- Application-Id or Acct-Application-Id AVP MUST be present. The Application Id carried by either Auth-Application-Id or Acct- Application-Id AVP MUST comply with vendor-specific Application Id assignment described in Section 11.3. It MUST also match the Application Id present in the Diameter header except when used in a CER or CEA message. The Vendor-Id AVP is an informational AVP pertaining to the vendor who may have authorship of the vendor-specific Diameter application. It MUST NOT be used as a means of defining a completely separate vendor-specific Application Id space. The Vendor-Specific-Application-Id AVP SHOULD be placed as close to the Diameter header as possible. AVP Format <Vendor-Specific-Application-Id> ::= < AVP Header: 260 > 1* [ Vendor-Id ] [ Auth-Application-Id ] [ Acct-Application-Id ] A Vendor-Specific-Application-Id AVP MUST contain exactly one of either Auth-Application-Id or Acct-Application-Id. If a Vendor- Specific-Application-Id is received without one of these two AVPs, then the recipient SHOULD issue an answer with a Result-Code set to DIAMETER_MISSING_AVP. The answer SHOULD also include a Failed-AVP, which MUST contain an example of an Auth-Application-Id AVP and an Acct-Application-Id AVP. If a Vendor-Specific-Application-Id is received that contains both Auth-Application-Id and Acct-Application-Id, then the recipient MUST issue an answer with Result-Code set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES. The answer MUST also include a Failed-AVP, which MUST contain the received Auth-Application-Id AVP and Acct-Application-Id AVP.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 longgetAcctApplicationId()Returns the value of the Acct-Application-Id AVP, of type Unsigned32.longgetAuthApplicationId()Returns the value of the Auth-Application-Id AVP, of type Unsigned32.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.long[]getVendorIds()Returns the set of Vendor-Id AVPs.booleanhasAcctApplicationId()Returns true if the Acct-Application-Id AVP is present in the Vendor-Specific-Application-Id AVP.booleanhasAuthApplicationId()Returns true if the Auth-Application-Id AVP is present in the Vendor-Specific-Application-Id AVP.voidremoveAcctApplicationId()Removes the Acct-Application-Id AVP from the Vendor-Specific-Application-Id AVP.voidremoveAuthApplicationId()Removes the Auth-Application-Id AVP from the Vendor-Specific-Application-Id AVP.voidremoveExtensionAvps()Removes all extension AVPs from the Vendor-Specific-Application-Id AVP.voidremoveVendorIds()Removes all Vendor-Id AVPs from the Vendor-Specific-Application-Id AVP.voidsetAcctApplicationId(long acctApplicationId)Sets the value of the Acct-Application-Id AVP, of type Unsigned32.voidsetAuthApplicationId(long authApplicationId)Sets the value of the Auth-Application-Id AVP, of type Unsigned32.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetVendorId(long vendorId)Sets a single Vendor-Id AVP in the Vendor-Specific-Application-Id AVP, of type Unsigned32.voidsetVendorIds(long[] vendorIds)Sets the set of Vendor-Id AVPs, with all the values in the given array.-
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
-
getVendorIds
long[] getVendorIds()
Returns the set of Vendor-Id AVPs. The returned array contains the AVPs in the order they appear in the Vendor-Specific-Application-Id AVP. A return value of null implies that no Vendor-Id AVPs have been set. The elements in the given array are long objects.
-
setVendorId
void setVendorId(long vendorId)
Sets a single Vendor-Id AVP in the Vendor-Specific-Application-Id AVP, of type Unsigned32.
-
setVendorIds
void setVendorIds(long[] vendorIds)
Sets the set of Vendor-Id AVPs, with all the values in the given array. The AVPs will be added to the Vendor-Specific-Application-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 getVendorIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifvendorIdsisnull.
-
removeVendorIds
void removeVendorIds()
Removes all Vendor-Id AVPs from the Vendor-Specific-Application-Id AVP. If no Vendor-Id AVPs are present, this method returns silently.
-
hasAuthApplicationId
boolean hasAuthApplicationId()
Returns true if the Auth-Application-Id AVP is present in the Vendor-Specific-Application-Id AVP.
-
getAuthApplicationId
long getAuthApplicationId()
Returns the value of the Auth-Application-Id AVP, of type Unsigned32. UsehasAuthApplicationId()to check the existence of this AVP.- Returns:
- the value of the Auth-Application-Id AVP
- Throws:
IllegalStateException- if the Auth-Application-Id AVP has not been set.
-
setAuthApplicationId
void setAuthApplicationId(long authApplicationId)
Sets the value of the Auth-Application-Id AVP, of type Unsigned32.
-
removeAuthApplicationId
void removeAuthApplicationId()
Removes the Auth-Application-Id AVP from the Vendor-Specific-Application-Id AVP. If the Auth-Application-Id AVP is not present, this method returns silently.
-
hasAcctApplicationId
boolean hasAcctApplicationId()
Returns true if the Acct-Application-Id AVP is present in the Vendor-Specific-Application-Id AVP.
-
getAcctApplicationId
long getAcctApplicationId()
Returns the value of the Acct-Application-Id AVP, of type Unsigned32. UsehasAcctApplicationId()to check the existence of this AVP.- Returns:
- the value of the Acct-Application-Id AVP
- Throws:
IllegalStateException- if the Acct-Application-Id AVP has not been set.
-
setAcctApplicationId
void setAcctApplicationId(long acctApplicationId)
Sets the value of the Acct-Application-Id AVP, of type Unsigned32.
-
removeAcctApplicationId
void removeAcctApplicationId()
Removes the Acct-Application-Id AVP from the Vendor-Specific-Application-Id AVP. If the Acct-Application-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 Vendor-Specific-Application-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 Vendor-Specific-Application-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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Vendor-Specific-Application-Id AVP. If no extension AVPs are present, this method returns silently.
-
-