Interface AccountingAnswer
-
- All Superinterfaces:
Cloneable,DiameterMessage
public interface AccountingAnswer extends DiameterMessage
Defines an interface representing the Accounting-Answer command. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:6.2.3 Accounting-Answer Message The Accounting Answer (ACA) messages, indicated by the Command-Code field set to 271 is sent by the CDF to the CTF in order to reply to the ACR. The ACA message format is defined according to the Diameter Base Protocol [401] as follows: <Accounting-Answer> ::= < Diameter Header: 271, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ User-Name ] [ Error-Reporting-Host ] [ Acct-Interim-Interval ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ AVP ]
-
-
Field Summary
Fields Modifier and Type Field Description static intcommandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAccountingRecordNumber()Returns the value of the Accounting-Record-Number AVP, of type Unsigned32.AccountingRecordTypegetAccountingRecordType()Returns the value of the Accounting-Record-Type AVP, of type Enumerated.longgetAcctApplicationId()Returns the value of the Acct-Application-Id AVP, of type Unsigned32.longgetAcctInterimInterval()Returns the value of the Acct-Interim-Interval AVP, of type Unsigned32.DiameterIdentitygetErrorReportingHost()Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.DategetEventTimestamp()Returns the value of the Event-Timestamp AVP, of type Time.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.DiameterIdentitygetOriginHost()Returns the value of the Origin-Host AVP, of type DiameterIdentity.DiameterIdentitygetOriginRealm()Returns the value of the Origin-Realm AVP, of type DiameterIdentity.longgetOriginStateId()Returns the value of the Origin-State-Id AVP, of type Unsigned32.ProxyInfo[]getProxyInfos()Returns the set of Proxy-Info AVPs.longgetResultCode()Returns the value of the Result-Code AVP, of type Unsigned32.StringgetSessionId()Returns the value of the Session-Id AVP, of type UTF8String.StringgetUserName()Returns the value of the User-Name AVP, of type UTF8String.booleanhasAccountingRecordNumber()Returns true if the Accounting-Record-Number AVP is present in the message.booleanhasAccountingRecordType()Returns true if the Accounting-Record-Type AVP is present in the message.booleanhasAcctApplicationId()Returns true if the Acct-Application-Id AVP is present in the message.booleanhasAcctInterimInterval()Returns true if the Acct-Interim-Interval AVP is present in the message.booleanhasErrorReportingHost()Returns true if the Error-Reporting-Host AVP is present in the message.booleanhasEventTimestamp()Returns true if the Event-Timestamp AVP is present in the message.booleanhasOriginHost()Returns true if the Origin-Host AVP is present in the message.booleanhasOriginRealm()Returns true if the Origin-Realm AVP is present in the message.booleanhasOriginStateId()Returns true if the Origin-State-Id AVP is present in the message.booleanhasResultCode()Returns true if the Result-Code AVP is present in the message.booleanhasSessionId()Returns true if the Session-Id AVP is present in the message.booleanhasUserName()Returns true if the User-Name AVP is present in the message.voidremoveAccountingRecordNumber()Removes the Accounting-Record-Number AVP from the message.voidremoveAccountingRecordType()Removes the Accounting-Record-Type AVP from the message.voidremoveAcctApplicationId()Removes the Acct-Application-Id AVP from the message.voidremoveAcctInterimInterval()Removes the Acct-Interim-Interval AVP from the message.voidremoveErrorReportingHost()Removes the Error-Reporting-Host AVP from the message.voidremoveEventTimestamp()Removes the Event-Timestamp AVP from the message.voidremoveExtensionAvps()Removes all extension AVPs from the message.voidremoveOriginHost()Removes the Origin-Host AVP from the message.voidremoveOriginRealm()Removes the Origin-Realm AVP from the message.voidremoveOriginStateId()Removes the Origin-State-Id AVP from the message.voidremoveProxyInfos()Removes all Proxy-Info AVPs from the message.voidremoveResultCode()Removes the Result-Code AVP from the message.voidremoveSessionId()Removes the Session-Id AVP from the message.voidremoveUserName()Removes the User-Name AVP from the message.voidsetAccountingRecordNumber(long accountingRecordNumber)Sets the value of the Accounting-Record-Number AVP, of type Unsigned32.voidsetAccountingRecordType(AccountingRecordType accountingRecordType)Sets the value of the Accounting-Record-Type AVP, of type Enumerated.voidsetAcctApplicationId(long acctApplicationId)Sets the value of the Acct-Application-Id AVP, of type Unsigned32.voidsetAcctInterimInterval(long acctInterimInterval)Sets the value of the Acct-Interim-Interval AVP, of type Unsigned32.voidsetErrorReportingHost(DiameterIdentity errorReportingHost)Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.voidsetEventTimestamp(Date eventTimestamp)Sets the value of the Event-Timestamp AVP, of type Time.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetOriginHost(DiameterIdentity originHost)Sets the value of the Origin-Host AVP, of type DiameterIdentity.voidsetOriginRealm(DiameterIdentity originRealm)Sets the value of the Origin-Realm AVP, of type DiameterIdentity.voidsetOriginStateId(long originStateId)Sets the value of the Origin-State-Id AVP, of type Unsigned32.voidsetProxyInfo(ProxyInfo proxyInfo)Sets a single Proxy-Info AVP in the message, of type Grouped.voidsetProxyInfos(ProxyInfo[] proxyInfos)Sets the set of Proxy-Info AVPs, with all the values in the given array.voidsetResultCode(long resultCode)Sets the value of the Result-Code AVP, of type Unsigned32.voidsetSessionId(String sessionId)Sets the value of the Session-Id AVP, of type UTF8String.voidsetUserName(String userName)Sets the value of the User-Name AVP, of type UTF8String.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterMessage
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getHeader, setDestinationHost, setDestinationRealm
-
-
-
-
Field Detail
-
commandCode
static final int commandCode
- See Also:
- Constant Field Values
-
-
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:
getSessionIdin interfaceDiameterMessage- Returns:
- the value of the Session-Id AVP or null if it has not been set on this message
-
setSessionId
void setSessionId(String sessionId)
Sets the value of the Session-Id AVP, of type UTF8String.- Specified by:
setSessionIdin interfaceDiameterMessage- Throws:
NullPointerException- ifsessionIdisnull.
-
removeSessionId
void removeSessionId()
Removes the Session-Id AVP from the message. If the Session-Id AVP is not present, this method returns silently.
-
hasResultCode
boolean hasResultCode()
Returns true if the Result-Code AVP is present in the message.
-
getResultCode
long getResultCode()
Returns the value of the Result-Code AVP, of type Unsigned32. UsehasResultCode()to check the existence of this AVP.- Returns:
- the value of the Result-Code AVP
- Throws:
IllegalStateException- if the Result-Code AVP has not been set on this message
-
setResultCode
void setResultCode(long resultCode)
Sets the value of the Result-Code AVP, of type Unsigned32.
-
removeResultCode
void removeResultCode()
Removes the Result-Code AVP from the message. If the Result-Code 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:
getOriginHostin interfaceDiameterMessage- Returns:
- the value of the Origin-Host AVP or null if it has not been set on this message
-
setOriginHost
void setOriginHost(DiameterIdentity originHost)
Sets the value of the Origin-Host AVP, of type DiameterIdentity.- Specified by:
setOriginHostin interfaceDiameterMessage- Throws:
NullPointerException- iforiginHostisnull.
-
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:
getOriginRealmin interfaceDiameterMessage- Returns:
- the value of the Origin-Realm AVP or null if it has not been set on this message
-
setOriginRealm
void setOriginRealm(DiameterIdentity originRealm)
Sets the value of the Origin-Realm AVP, of type DiameterIdentity.- Specified by:
setOriginRealmin interfaceDiameterMessage- Throws:
NullPointerException- iforiginRealmisnull.
-
removeOriginRealm
void removeOriginRealm()
Removes the Origin-Realm AVP from the message. If the Origin-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- ifaccountingRecordTypeisnull.
-
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. UsehasAccountingRecordNumber()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. UsehasAcctApplicationId()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- ifuserNameisnull.
-
removeUserName
void removeUserName()
Removes the User-Name AVP from the message. If the User-Name AVP is not present, this method returns silently.
-
hasErrorReportingHost
boolean hasErrorReportingHost()
Returns true if the Error-Reporting-Host AVP is present in the message.
-
getErrorReportingHost
DiameterIdentity getErrorReportingHost()
Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.- Returns:
- the value of the Error-Reporting-Host AVP or null if it has not been set on this message
-
setErrorReportingHost
void setErrorReportingHost(DiameterIdentity errorReportingHost)
Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.- Throws:
NullPointerException- iferrorReportingHostisnull.
-
removeErrorReportingHost
void removeErrorReportingHost()
Removes the Error-Reporting-Host AVP from the message. If the Error-Reporting-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. UsehasAcctInterimInterval()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. UsehasOriginStateId()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- ifeventTimestampisnull.
-
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- ifproxyInfoisnull.
-
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- ifproxyInfosisnull.
-
removeProxyInfos
void removeProxyInfos()
Removes all Proxy-Info AVPs from the message. If no Proxy-Info 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 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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the message. If no extension AVPs are present, this method returns silently.
-
-