Interface ExperimentalResult
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface ExperimentalResult extends GroupedAvp
Defines an interface representing the Experimental-Result grouped AVP type. From the Diameter Base Protocol (rfc6733.txt) specification:7.6. Experimental-Result AVP The Experimental-Result AVP (AVP Code 297) is of type Grouped, and indicates whether a particular vendor-specific request was completed successfully or whether an error occurred. This AVP has the following structure: AVP Format Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code } The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies the vendor responsible for the assignment of the result code that follows. All Diameter answer messages defined in vendor-specific applications MUST include either one Result-Code AVP or one Experimental-Result 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 long
getExperimentalResultCode()
Returns the value of the Experimental-Result-Code AVP, of type Unsigned32.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.long
getVendorId()
Returns the value of the Vendor-Id AVP, of type Unsigned32.boolean
hasExperimentalResultCode()
Returns true if the Experimental-Result-Code AVP is present in the Experimental-Result AVP.boolean
hasVendorId()
Returns true if the Vendor-Id AVP is present in the Experimental-Result AVP.void
removeExperimentalResultCode()
Removes the Experimental-Result-Code AVP from the Experimental-Result AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Experimental-Result AVP.void
removeVendorId()
Removes the Vendor-Id AVP from the Experimental-Result AVP.void
setExperimentalResultCode(long experimentalResultCode)
Sets the value of the Experimental-Result-Code AVP, of type Unsigned32.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setVendorId(long vendorId)
Sets the value of the Vendor-Id AVP, of type Unsigned32.-
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
-
hasVendorId
boolean hasVendorId()
Returns true if the Vendor-Id AVP is present in the Experimental-Result AVP.
-
getVendorId
long getVendorId()
Returns the value of the Vendor-Id AVP, of type Unsigned32. UsehasVendorId()
to check the existence of this AVP.- Returns:
- the value of the Vendor-Id AVP
- Throws:
IllegalStateException
- if the Vendor-Id AVP has not been set.
-
setVendorId
void setVendorId(long vendorId)
Sets the value of the Vendor-Id AVP, of type Unsigned32.
-
removeVendorId
void removeVendorId()
Removes the Vendor-Id AVP from the Experimental-Result AVP. If the Vendor-Id AVP is not present, this method returns silently.
-
hasExperimentalResultCode
boolean hasExperimentalResultCode()
Returns true if the Experimental-Result-Code AVP is present in the Experimental-Result AVP.
-
getExperimentalResultCode
long getExperimentalResultCode()
Returns the value of the Experimental-Result-Code AVP, of type Unsigned32. UsehasExperimentalResultCode()
to check the existence of this AVP.- Returns:
- the value of the Experimental-Result-Code AVP
- Throws:
IllegalStateException
- if the Experimental-Result-Code AVP has not been set.
-
setExperimentalResultCode
void setExperimentalResultCode(long experimentalResultCode)
Sets the value of the Experimental-Result-Code AVP, of type Unsigned32.
-
removeExperimentalResultCode
void removeExperimentalResultCode()
Removes the Experimental-Result-Code AVP from the Experimental-Result AVP. If the Experimental-Result-Code 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 Experimental-Result 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 Experimental-Result 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 Experimental-Result AVP. If no extension AVPs are present, this method returns silently.
-
-