Interface ServiceParameterInfo

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface ServiceParameterInfo
    extends GroupedAvp
    Defines an interface representing the Service-Parameter-Info grouped AVP type. From the Diameter Credit-Control Application (rfc4006.txt) specification:
     8.43.  Service-Parameter-Info AVP
     
        The Service-Parameter-Info AVP (AVP Code 440) is of type Grouped and
        contains service-specific information used for price calculation or
        rating.  The Service-Parameter-Type AVP defines the service parameter
        type, and the Service-Parameter-Value AVP contains the parameter
        value.  The actual contents of these AVPs are not within the scope of
        this document and SHOULD be defined in another Diameter application,
        in standards written by other standardization bodies, or in service-
        specific documentation.
     
        In the case of an unknown service request (e.g., unknown Service-
        Parameter-Type), the corresponding answer message MUST contain the
        error code DIAMETER_RATING_FAILED.  A Credit-Control-Answer message
        with this error MUST contain one or more Failed-AVP AVPs containing
        the Service-Parameter-Info AVPs that caused the failure.
     
        It is defined as follows (per the grouped-avp-def of RFC 3588
        [DIAMBASE]):
     
           Service-Parameter-Info ::= < AVP Header: 440 >
                                      { Service-Parameter-Type }
                                      { Service-Parameter-Value }
     
    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.
    • Method Detail

      • hasServiceParameterType

        boolean hasServiceParameterType()
        Returns true if the Service-Parameter-Type AVP is present in the Service-Parameter-Info AVP.
      • getServiceParameterType

        long getServiceParameterType()
        Returns the value of the Service-Parameter-Type AVP, of type Unsigned32. Use hasServiceParameterType() to check the existence of this AVP.
        Returns:
        the value of the Service-Parameter-Type AVP
        Throws:
        IllegalStateException - if the Service-Parameter-Type AVP has not been set.
      • setServiceParameterType

        void setServiceParameterType​(long serviceParameterType)
        Sets the value of the Service-Parameter-Type AVP, of type Unsigned32.
      • removeServiceParameterType

        void removeServiceParameterType()
        Removes the Service-Parameter-Type AVP from the Service-Parameter-Info AVP. If the Service-Parameter-Type AVP is not present, this method returns silently.
      • hasServiceParameterValue

        boolean hasServiceParameterValue()
        Returns true if the Service-Parameter-Value AVP is present in the Service-Parameter-Info AVP.
      • getServiceParameterValue

        byte[] getServiceParameterValue()
        Returns the value of the Service-Parameter-Value AVP, of type OctetString.
        Returns:
        the value of the Service-Parameter-Value AVP, or null if it has not been set.
      • setServiceParameterValue

        void setServiceParameterValue​(byte[] serviceParameterValue)
        Sets the value of the Service-Parameter-Value AVP, of type OctetString.
        Throws:
        NullPointerException - if serviceParameterValue is null.
      • removeServiceParameterValue

        void removeServiceParameterValue()
        Removes the Service-Parameter-Value AVP from the Service-Parameter-Info AVP. If the Service-Parameter-Value 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 Service-Parameter-Info 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 Service-Parameter-Info 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 - if avps is null.
      • removeExtensionAvps

        void removeExtensionAvps()
        Removes all extension AVPs from the Service-Parameter-Info AVP. If no extension AVPs are present, this method returns silently.