Interface AccountingRequest

  • All Superinterfaces:
    Cloneable, DiameterMessage

    public interface AccountingRequest
    extends DiameterMessage
    Defines an interface representing the Accounting-Request command. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V12.11.0) specification:
     6.2.2 Accounting-Request Message
     
     The ACR messages, indicated by the Command-Code field set to 271 is sent by the CTF to the CDF in order to sent charging information for the request bearer / subsystem /service.
     The ACR message format is defined according to the Diameter Base Protocol [401] as follows:
     
           <Accounting-Request> ::= < Diameter Header: 271, REQ, PXY >
                     < Session-Id >
                     { Origin-Host }
                     { Origin-Realm }
                     { Destination-Realm }
                     { Accounting-Record-Type }
                     { Accounting-Record-Number }
                     [ Acct-Application-Id ]
                     [ User-Name ]
                     [ Destination-Host ]
                     [ Acct-Interim-Interval ]
                     [ Origin-State-Id ]
                     [ Event-Timestamp ]
                   * [ Proxy-Info ]
                   * [ Route-Record ]
                     [ Service-Context-Id ]
                     [ Service-Information ]
                   * [ AVP ]
     NOTE:   Similar information as in subscription_id should be added as 3GPP parameter, IMEI.
     
     
    • Method Detail

      • hasSessionId

        boolean hasSessionId()
        Returns true if the Session-Id AVP is present in the message.
      • getSessionId

        String getSessionId()
        Returns the value of the Session-Id AVP, of type UTF8String.
        Specified by:
        getSessionId in interface DiameterMessage
        Returns:
        the value of the Session-Id AVP or null if it has not been set on this message
      • removeSessionId

        void removeSessionId()
        Removes the Session-Id AVP from the message. If the Session-Id AVP is not present, this method returns silently.
      • hasOriginHost

        boolean hasOriginHost()
        Returns true if the Origin-Host AVP is present in the message.
      • getOriginHost

        DiameterIdentity getOriginHost()
        Returns the value of the Origin-Host AVP, of type DiameterIdentity.
        Specified by:
        getOriginHost in interface DiameterMessage
        Returns:
        the value of the Origin-Host AVP or null if it has not been set on this message
      • removeOriginHost

        void removeOriginHost()
        Removes the Origin-Host AVP from the message. If the Origin-Host AVP is not present, this method returns silently.
      • hasOriginRealm

        boolean hasOriginRealm()
        Returns true if the Origin-Realm AVP is present in the message.
      • getOriginRealm

        DiameterIdentity getOriginRealm()
        Returns the value of the Origin-Realm AVP, of type DiameterIdentity.
        Specified by:
        getOriginRealm in interface DiameterMessage
        Returns:
        the value of the Origin-Realm AVP or null if it has not been set on this message
      • removeOriginRealm

        void removeOriginRealm()
        Removes the Origin-Realm AVP from the message. If the Origin-Realm AVP is not present, this method returns silently.
      • hasDestinationRealm

        boolean hasDestinationRealm()
        Returns true if the Destination-Realm AVP is present in the message.
      • getDestinationRealm

        DiameterIdentity getDestinationRealm()
        Returns the value of the Destination-Realm AVP, of type DiameterIdentity.
        Specified by:
        getDestinationRealm in interface DiameterMessage
        Returns:
        the value of the Destination-Realm AVP or null if it has not been set on this message
      • removeDestinationRealm

        void removeDestinationRealm()
        Removes the Destination-Realm AVP from the message. If the Destination-Realm AVP is not present, this method returns silently.
      • hasAccountingRecordType

        boolean hasAccountingRecordType()
        Returns true if the Accounting-Record-Type AVP is present in the message.
      • getAccountingRecordType

        AccountingRecordType getAccountingRecordType()
        Returns the value of the Accounting-Record-Type AVP, of type Enumerated.
        Returns:
        the value of the Accounting-Record-Type AVP or null if it has not been set on this message
      • setAccountingRecordType

        void setAccountingRecordType​(AccountingRecordType accountingRecordType)
        Sets the value of the Accounting-Record-Type AVP, of type Enumerated.
        Throws:
        NullPointerException - if accountingRecordType is null.
      • removeAccountingRecordType

        void removeAccountingRecordType()
        Removes the Accounting-Record-Type AVP from the message. If the Accounting-Record-Type AVP is not present, this method returns silently.
      • hasAccountingRecordNumber

        boolean hasAccountingRecordNumber()
        Returns true if the Accounting-Record-Number AVP is present in the message.
      • getAccountingRecordNumber

        long getAccountingRecordNumber()
        Returns the value of the Accounting-Record-Number AVP, of type Unsigned32. Use hasAccountingRecordNumber() to check the existence of this AVP.
        Returns:
        the value of the Accounting-Record-Number AVP
        Throws:
        IllegalStateException - if the Accounting-Record-Number AVP has not been set on this message
      • setAccountingRecordNumber

        void setAccountingRecordNumber​(long accountingRecordNumber)
        Sets the value of the Accounting-Record-Number AVP, of type Unsigned32.
      • removeAccountingRecordNumber

        void removeAccountingRecordNumber()
        Removes the Accounting-Record-Number AVP from the message. If the Accounting-Record-Number AVP is not present, this method returns silently.
      • hasAcctApplicationId

        boolean hasAcctApplicationId()
        Returns true if the Acct-Application-Id AVP is present in the message.
      • getAcctApplicationId

        long getAcctApplicationId()
        Returns the value of the Acct-Application-Id AVP, of type Unsigned32. Use hasAcctApplicationId() to check the existence of this AVP.
        Returns:
        the value of the Acct-Application-Id AVP
        Throws:
        IllegalStateException - if the Acct-Application-Id AVP has not been set on this message
      • setAcctApplicationId

        void setAcctApplicationId​(long acctApplicationId)
        Sets the value of the Acct-Application-Id AVP, of type Unsigned32.
      • removeAcctApplicationId

        void removeAcctApplicationId()
        Removes the Acct-Application-Id AVP from the message. If the Acct-Application-Id AVP is not present, this method returns silently.
      • hasUserName

        boolean hasUserName()
        Returns true if the User-Name AVP is present in the message.
      • getUserName

        String getUserName()
        Returns the value of the User-Name AVP, of type UTF8String.
        Returns:
        the value of the User-Name AVP or null if it has not been set on this message
      • setUserName

        void setUserName​(String userName)
        Sets the value of the User-Name AVP, of type UTF8String.
        Throws:
        NullPointerException - if userName is null.
      • removeUserName

        void removeUserName()
        Removes the User-Name AVP from the message. If the User-Name AVP is not present, this method returns silently.
      • hasDestinationHost

        boolean hasDestinationHost()
        Returns true if the Destination-Host AVP is present in the message.
      • getDestinationHost

        DiameterIdentity getDestinationHost()
        Returns the value of the Destination-Host AVP, of type DiameterIdentity.
        Specified by:
        getDestinationHost in interface DiameterMessage
        Returns:
        the value of the Destination-Host AVP or null if it has not been set on this message
      • removeDestinationHost

        void removeDestinationHost()
        Removes the Destination-Host AVP from the message. If the Destination-Host AVP is not present, this method returns silently.
      • hasAcctInterimInterval

        boolean hasAcctInterimInterval()
        Returns true if the Acct-Interim-Interval AVP is present in the message.
      • getAcctInterimInterval

        long getAcctInterimInterval()
        Returns the value of the Acct-Interim-Interval AVP, of type Unsigned32. Use hasAcctInterimInterval() to check the existence of this AVP.
        Returns:
        the value of the Acct-Interim-Interval AVP
        Throws:
        IllegalStateException - if the Acct-Interim-Interval AVP has not been set on this message
      • setAcctInterimInterval

        void setAcctInterimInterval​(long acctInterimInterval)
        Sets the value of the Acct-Interim-Interval AVP, of type Unsigned32.
      • removeAcctInterimInterval

        void removeAcctInterimInterval()
        Removes the Acct-Interim-Interval AVP from the message. If the Acct-Interim-Interval AVP is not present, this method returns silently.
      • hasOriginStateId

        boolean hasOriginStateId()
        Returns true if the Origin-State-Id AVP is present in the message.
      • getOriginStateId

        long getOriginStateId()
        Returns the value of the Origin-State-Id AVP, of type Unsigned32. Use hasOriginStateId() to check the existence of this AVP.
        Returns:
        the value of the Origin-State-Id AVP
        Throws:
        IllegalStateException - if the Origin-State-Id AVP has not been set on this message
      • setOriginStateId

        void setOriginStateId​(long originStateId)
        Sets the value of the Origin-State-Id AVP, of type Unsigned32.
      • removeOriginStateId

        void removeOriginStateId()
        Removes the Origin-State-Id AVP from the message. If the Origin-State-Id AVP is not present, this method returns silently.
      • hasEventTimestamp

        boolean hasEventTimestamp()
        Returns true if the Event-Timestamp AVP is present in the message.
      • getEventTimestamp

        Date getEventTimestamp()
        Returns the value of the Event-Timestamp AVP, of type Time.
        Returns:
        the value of the Event-Timestamp AVP or null if it has not been set on this message
      • setEventTimestamp

        void setEventTimestamp​(Date eventTimestamp)
        Sets the value of the Event-Timestamp AVP, of type Time.
        Throws:
        NullPointerException - if eventTimestamp is null.
      • removeEventTimestamp

        void removeEventTimestamp()
        Removes the Event-Timestamp AVP from the message. If the Event-Timestamp AVP is not present, this method returns silently.
      • getProxyInfos

        ProxyInfo[] getProxyInfos()
        Returns the set of Proxy-Info AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Proxy-Info AVPs have been set. The elements in the given array are ProxyInfo objects.
      • setProxyInfo

        void setProxyInfo​(ProxyInfo proxyInfo)
        Sets a single Proxy-Info AVP in the message, of type Grouped.
        Throws:
        NullPointerException - if proxyInfo is null.
      • setProxyInfos

        void setProxyInfos​(ProxyInfo[] proxyInfos)
        Sets the set of Proxy-Info AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getProxyInfos() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if proxyInfos is null.
      • removeProxyInfos

        void removeProxyInfos()
        Removes all Proxy-Info AVPs from the message. If no Proxy-Info AVPs are present, this method returns silently.
      • getRouteRecords

        DiameterIdentity[] getRouteRecords()
        Returns the set of Route-Record AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Route-Record AVPs have been set. The elements in the given array are DiameterIdentity objects.
      • setRouteRecord

        void setRouteRecord​(DiameterIdentity routeRecord)
        Sets a single Route-Record AVP in the message, of type DiameterIdentity.
        Throws:
        NullPointerException - if routeRecord is null.
      • setRouteRecords

        void setRouteRecords​(DiameterIdentity[] routeRecords)
        Sets the set of Route-Record AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getRouteRecords() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if routeRecords is null.
      • removeRouteRecords

        void removeRouteRecords()
        Removes all Route-Record AVPs from the message. If no Route-Record AVPs are present, this method returns silently.
      • hasServiceContextId

        boolean hasServiceContextId()
        Returns true if the Service-Context-Id AVP is present in the message.
      • getServiceContextId

        String getServiceContextId()
        Returns the value of the Service-Context-Id AVP, of type UTF8String.
        Returns:
        the value of the Service-Context-Id AVP or null if it has not been set on this message
      • setServiceContextId

        void setServiceContextId​(String serviceContextId)
        Sets the value of the Service-Context-Id AVP, of type UTF8String.
        Throws:
        NullPointerException - if serviceContextId is null.
      • removeServiceContextId

        void removeServiceContextId()
        Removes the Service-Context-Id AVP from the message. If the Service-Context-Id AVP is not present, this method returns silently.
      • hasServiceInformation

        boolean hasServiceInformation()
        Returns true if the Service-Information AVP is present in the message.
      • getServiceInformation

        ServiceInformation getServiceInformation()
        Returns the value of the Service-Information AVP, of type Grouped.
        Returns:
        the value of the Service-Information AVP or null if it has not been set on this message
      • setServiceInformation

        void setServiceInformation​(ServiceInformation serviceInformation)
        Sets the value of the Service-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if serviceInformation is null.
      • removeServiceInformation

        void removeServiceInformation()
        Removes the Service-Information AVP from the message. If the Service-Information 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 message. 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 message 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 message. If no extension AVPs are present, this method returns silently.