Interface DiameterAvp

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] byteArrayValue()
      Return the raw contents of this AVP
      Object clone()
      Creates and returns a deep copy of this AVP instance.
      double doubleValue()
      The value of this AVP if the Diameter type can be represented in a Java double value (e.g., Float64, Float32)
      float floatValue()
      The value of this AVP if the Diameter type can be represented in a Java float value (e.g., Float32)
      int getCode()
      Return the AVP code, e.g., 263 for Session-Id
      int getMandatoryRule()
      Return the rule for the mandatory (M) flag of this AVP.
      String getName()
      Return the AVP name, e.g., "Session-Id"
      int getProtectedRule()
      Return the rule for the protected (P) flag of this AVP.
      DiameterAvpType getType()
      Return the AVP type (one of the String constants from DiameterAvpType.
      int getVendorID()
      Return the Vendor-ID value for proprietary (non-IETF) AVPs.
      DiameterAvp[] groupedAvpValue()
      Return the AVPs contained in this GroupedAvp as an array of DiameterAvp objects if the AVP is a Grouped AVP.
      int intValue()
      The value of this AVP if the Diameter type can be represented in a Java int value (e.g., Integer32)
      long longValue()
      The value of this AVP if the Diameter type can be represented in a Java long value (e.g., Integer64, Unsigned32, Integer32)
      String stringValue()
      The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)
    • Method Detail

      • getCode

        int getCode()
        Return the AVP code, e.g., 263 for Session-Id
        Returns:
        the AVP code
      • getVendorID

        int getVendorID()
        Return the Vendor-ID value for proprietary (non-IETF) AVPs.

        The value should be the IANA-assigned "SMI Network Management Private Enterprise Codes" value of the organisation that defined the AVP, for example 3GPP is 10415.

        A Vendor-ID value of zero means the Vendor-ID is not specified. Standard AVPs defined by IETF will have a Vendor-ID of zero.

        Returns:
        the Vendor-ID, or zero if it is not specified.
      • getName

        String getName()
        Return the AVP name, e.g., "Session-Id"
        Returns:
        the AVP name
      • getMandatoryRule

        int getMandatoryRule()
        Return the rule for the mandatory (M) flag of this AVP.

        0 - MUST
        1 - MAY
        2 - MUSTNOT

      • getProtectedRule

        int getProtectedRule()
        Return the rule for the protected (P) flag of this AVP.

        0 - MUST
        1 - MAY
        2 - MUSTNOT

      • doubleValue

        double doubleValue()
        The value of this AVP if the Diameter type can be represented in a Java double value (e.g., Float64, Float32)
        Returns:
        the AVP value as a double
        Throws:
        IllegalArgumentException - if the AVP does not contain a double equivalent
      • floatValue

        float floatValue()
        The value of this AVP if the Diameter type can be represented in a Java float value (e.g., Float32)
        Returns:
        the AVP value as a float
        Throws:
        IllegalArgumentException - if the AVP does not contain a float equivalent
      • intValue

        int intValue()
        The value of this AVP if the Diameter type can be represented in a Java int value (e.g., Integer32)
        Returns:
        the AVP value as an int
        Throws:
        IllegalArgumentException - if the AVP does not contain an int equivalent
      • longValue

        long longValue()
        The value of this AVP if the Diameter type can be represented in a Java long value (e.g., Integer64, Unsigned32, Integer32)
        Returns:
        the AVP value as a long
        Throws:
        IllegalArgumentException - if the AVP does not contain a long equivalent
      • stringValue

        String stringValue()
        The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)
        Returns:
        the AVP value as a String
        Throws:
        IllegalArgumentException - if the AVP does not contain a String equivalent
      • byteArrayValue

        byte[] byteArrayValue()
        Return the raw contents of this AVP
        Returns:
        the AVP value as a byte array
      • groupedAvpValue

        DiameterAvp[] groupedAvpValue()
        Return the AVPs contained in this GroupedAvp as an array of DiameterAvp objects if the AVP is a Grouped AVP. AVPs are returned in the same order in which they appear in the message.
        Returns:
        the AVP value as an array of AVPs
        Throws:
        IllegalArgumentException - if the AVP is not of Grouped type
      • clone

        Object clone()
        Creates and returns a deep copy of this AVP instance.
        Returns:
        a deep copy of this AVP.