Interface EventType

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface EventType
    extends GroupedAvp
    Defines an interface representing the Event-Type grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V7.9.0) specification:
     7.2.35      Event-Type AVP
     
     The Event-Type AVP (AVP code 823) is of type Grouped and contains
     information about the type of chargeable telecommunication service/event
     for which the accounting-request message is generated.
     It has the following ABNF grammar:
     
           Event-Type ::=  <AVP Header: 823 >
                               [ SIP-Method ]
                               [ Event ]
                               [ Expires ]
     
    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

      • hasSipMethod

        boolean hasSipMethod()
        Returns true if the SIP-Method AVP is present in the Event-Type AVP.
      • getSipMethod

        String getSipMethod()
        Returns the value of the SIP-Method AVP, of type UTF8String.
        Returns:
        the value of the SIP-Method AVP, or null if it has not been set.
      • setSipMethod

        void setSipMethod​(String sipMethod)
        Sets the value of the SIP-Method AVP, of type UTF8String.
        Throws:
        NullPointerException - if sipMethod is null.
      • removeSipMethod

        void removeSipMethod()
        Removes the SIP-Method AVP from the Event-Type AVP. If the SIP-Method AVP is not present, this method returns silently.
      • hasEvent

        boolean hasEvent()
        Returns true if the Event AVP is present in the Event-Type AVP.
      • getEvent

        String getEvent()
        Returns the value of the Event AVP, of type UTF8String.
        Returns:
        the value of the Event AVP, or null if it has not been set.
      • setEvent

        void setEvent​(String event)
        Sets the value of the Event AVP, of type UTF8String.
        Throws:
        NullPointerException - if event is null.
      • removeEvent

        void removeEvent()
        Removes the Event AVP from the Event-Type AVP. If the Event AVP is not present, this method returns silently.
      • hasExpires

        boolean hasExpires()
        Returns true if the Expires AVP is present in the Event-Type AVP.
      • getExpires

        long getExpires()
        Returns the value of the Expires AVP, of type Unsigned32. Use hasExpires() to check the existence of this AVP.
        Returns:
        the value of the Expires AVP
        Throws:
        IllegalStateException - if the Expires AVP has not been set.
      • setExpires

        void setExpires​(long expires)
        Sets the value of the Expires AVP, of type Unsigned32.
      • removeExpires

        void removeExpires()
        Removes the Expires AVP from the Event-Type AVP. If the Expires 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 Event-Type 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 Event-Type 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 Event-Type AVP. If no extension AVPs are present, this method returns silently.