Interface EarlyMediaDescription

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface EarlyMediaDescription
    extends GroupedAvp
    Defines an interface representing the Early-Media-Description grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V10.0.0) specification:
     7.2.58      Early-Media-Description AVP
     
     The Early-Media-Description AVP (AVP code 1272) is of type grouped and describes the SDP session, media
     parameters and timestamps related to media components set to active according to SDP signalling exchanged during a
     SIP session establishment before the final successful or unsuccessful SIP answer to the initial SIP INVITE message is
     received. Once a media component has been set to active, subsequent status changes shall also be registered.
     
     Media can be considered as inactive in range of situations, such as the listed below according to RFC 3264 [408]:
       Media marked with "a=inactive" attribute.
       Media offered with zero bandwith.
     
     In contrast, media with directionality marked as "a=recvonly", "a=sendonly", "a=sendrecv" shall be considered in state
     "active" and thus, it may be exchanged in one or both directions.
     It has the following ABNF grammar:
     
         Early-Media-Description ::= <AVP Header: 1272>
                                     [ SDP-TimeStamps ] 
                                   * [ SDP-Media-Component ]
                                   * [ SDP-Session-Description ]
     
    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

      • hasSdpTimestamps

        boolean hasSdpTimestamps()
        Returns true if the SDP-TimeStamps AVP is present in the Early-Media-Description AVP.
      • getSdpTimestamps

        SdpTimestamps getSdpTimestamps()
        Returns the value of the SDP-TimeStamps AVP, of type Grouped.
        Returns:
        the value of the SDP-TimeStamps AVP, or null if it has not been set.
      • setSdpTimestamps

        void setSdpTimestamps​(SdpTimestamps sdpTimestamps)
        Sets the value of the SDP-TimeStamps AVP, of type Grouped.
        Throws:
        NullPointerException - if sdpTimestamps is null.
      • removeSdpTimestamps

        void removeSdpTimestamps()
        Removes the SDP-TimeStamps AVP from the Early-Media-Description AVP. If the SDP-TimeStamps AVP is not present, this method returns silently.
      • getSdpMediaComponents

        SdpMediaComponent[] getSdpMediaComponents()
        Returns the set of SDP-Media-Component AVPs. The returned array contains the AVPs in the order they appear in the Early-Media-Description AVP. A return value of null implies that no SDP-Media-Component AVPs have been set. The elements in the given array are SdpMediaComponent objects.
      • setSdpMediaComponent

        void setSdpMediaComponent​(SdpMediaComponent sdpMediaComponent)
        Sets a single SDP-Media-Component AVP in the Early-Media-Description AVP, of type Grouped.
        Throws:
        NullPointerException - if sdpMediaComponent is null.
      • setSdpMediaComponents

        void setSdpMediaComponents​(SdpMediaComponent[] sdpMediaComponents)
        Sets the set of SDP-Media-Component AVPs, with all the values in the given array. The AVPs will be added to the Early-Media-Description 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 getSdpMediaComponents() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if sdpMediaComponents is null.
      • removeSdpMediaComponents

        void removeSdpMediaComponents()
        Removes all SDP-Media-Component AVPs from the Early-Media-Description AVP. If no SDP-Media-Component AVPs are present, this method returns silently.
      • getSdpSessionDescriptions

        String[] getSdpSessionDescriptions()
        Returns the set of SDP-Session-Description AVPs. The returned array contains the AVPs in the order they appear in the Early-Media-Description AVP. A return value of null implies that no SDP-Session-Description AVPs have been set. The elements in the given array are String objects.
      • setSdpSessionDescription

        void setSdpSessionDescription​(String sdpSessionDescription)
        Sets a single SDP-Session-Description AVP in the Early-Media-Description AVP, of type UTF8String.
        Throws:
        NullPointerException - if sdpSessionDescription is null.
      • setSdpSessionDescriptions

        void setSdpSessionDescriptions​(String[] sdpSessionDescriptions)
        Sets the set of SDP-Session-Description AVPs, with all the values in the given array. The AVPs will be added to the Early-Media-Description 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 getSdpSessionDescriptions() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if sdpSessionDescriptions is null.
      • removeSdpSessionDescriptions

        void removeSdpSessionDescriptions()
        Removes all SDP-Session-Description AVPs from the Early-Media-Description AVP. If no SDP-Session-Description AVPs are 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 Early-Media-Description 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 Early-Media-Description 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 Early-Media-Description AVP. If no extension AVPs are present, this method returns silently.