net.java.slee.resource.diameter.base.events
Interface AccountingAnswer

All Superinterfaces:
java.lang.Cloneable, DiameterMessage
All Known Implementing Classes:
AccountingAnswerImpl, AccountingRequestImpl

public interface AccountingAnswer
extends DiameterMessage

Defines an interface representing the Accounting-Answer command. From the Diameter Base Protocol (rfc3588.txt) specification:

 9.7.2.  Accounting-Answer
 
    The Accounting-Answer (ACA) command, indicated by the Command-Code
    field set to 271 and the Command Flags' 'R' bit cleared, is used to
    acknowledge an Accounting-Request command.  The Accounting-Answer
    command contains the same Session-Id and includes the usage AVPs only
    if CMS is in use when sending this command.  Note that the inclusion
    of the usage AVPs when CMS is not being used leads to unnecessarily
    large answer messages, and can not be used as a server's proof of the
    receipt of these AVPs in an end-to-end fashion.  If the Accounting-
    Request was protected by end-to-end security, then the corresponding
    ACA message MUST be protected by end-to-end security.
 
    Only the target Diameter Server, known as the home Diameter Server,
    SHOULD respond with the Accounting-Answer command.
 
    One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs
    MUST be present.  If the Vendor-Specific-Application-Id grouped AVP
    is present, it must have an Acct-Application-Id inside.
 
    The AVP listed below SHOULD include service specific accounting AVPs,
    as described in Section 9.3.
 
    Message Format
 
       <Accounting-Answer> ::= < Diameter Header: 271, PXY >
                 < Session-Id >
                 { Result-Code }
                 { Origin-Host }
                 { Origin-Realm }
                 { Accounting-Record-Type }
                 { Accounting-Record-Number }
                 [ Acct-Application-Id ]
                 [ Vendor-Specific-Application-Id ]
                 [ User-Name ]
                 [ Accounting-Sub-Session-Id ]
                 [ Accounting-Session-Id ]
                 [ Acct-Multi-Session-Id ]
                 [ Error-Reporting-Host ]
                 [ Acct-Interim-Interval ]
                 [ Accounting-Realtime-Required ]
                 [ Origin-State-Id ]
                 [ Event-Timestamp ]
               * [ Proxy-Info ]
               * [ AVP ]
 


Field Summary
static int commandCode
           
 
Method Summary
 AccountingRealtimeRequiredType getAccountingRealtimeRequired()
          Returns the value of the Accounting-Realtime-Required AVP, of type Enumerated.
 long getAccountingRecordNumber()
          Returns the value of the Accounting-Record-Number AVP, of type Unsigned32.
 AccountingRecordType getAccountingRecordType()
          Returns the value of the Accounting-Record-Type AVP, of type Enumerated.
 byte[] getAccountingSessionId()
          Returns the value of the Accounting-Session-Id AVP, of type OctetString.
 long getAccountingSubSessionId()
          Returns the value of the Accounting-Sub-Session-Id AVP, of type Unsigned64.
 long getAcctApplicationId()
          Returns the value of the Acct-Application-Id AVP, of type Unsigned32.
 long getAcctInterimInterval()
          Returns the value of the Acct-Interim-Interval AVP, of type Unsigned32.
 java.lang.String getAcctMultiSessionId()
          Returns the value of the Acct-Multi-Session-Id AVP, of type UTF8String.
 DiameterIdentityAvp getErrorReportingHost()
          Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
 java.util.Date getEventTimestamp()
          Returns the value of the Event-Timestamp AVP, of type Time.
 long getOriginStateId()
          Returns the value of the Origin-State-Id AVP, of type Unsigned32.
 ProxyInfoAvp[] getProxyInfos()
          Returns the set of Proxy-Info AVPs.
 long getResultCode()
          Returns the value of the Result-Code AVP, of type Unsigned32.
 java.lang.String getUserName()
          Returns the value of the User-Name AVP, of type UTF8String.
 VendorSpecificApplicationIdAvp getVendorSpecificApplicationId()
          Returns the value of the Vendor-Specific-Application-Id AVP, of type Grouped.
 boolean hasAccountingRealtimeRequired()
          Returns true if the Accounting-Realtime-Required AVP is present in the message.
 boolean hasAccountingRecordNumber()
          Returns true if the Accounting-Record-Number AVP is present in the message.
 boolean hasAccountingRecordType()
          Returns true if the Accounting-Record-Type AVP is present in the message.
 boolean hasAccountingSessionId()
          Returns true if the Accounting-Session-Id AVP is present in the message.
 boolean hasAccountingSubSessionId()
          Returns true if the Accounting-Sub-Session-Id AVP is present in the message.
 boolean hasAcctApplicationId()
          Returns true if the Acct-Application-Id AVP is present in the message.
 boolean hasAcctInterimInterval()
          Returns true if the Acct-Interim-Interval AVP is present in the message.
 boolean hasAcctMultiSessionId()
          Returns true if the Acct-Multi-Session-Id AVP is present in the message.
 boolean hasErrorReportingHost()
          Returns true if the Error-Reporting-Host AVP is present in the message.
 boolean hasEventTimestamp()
          Returns true if the Event-Timestamp AVP is present in the message.
 boolean hasOriginStateId()
          Returns true if the Origin-State-Id AVP is present in the message.
 boolean hasResultCode()
          Returns true if the Result-Code AVP is present in the message.
 boolean hasUserName()
          Returns true if the User-Name AVP is present in the message.
 boolean hasVendorSpecificApplicationId()
          Returns true if the Vendor-Specific-Application-Id AVP is present in the message.
 void setAccountingRealtimeRequired(AccountingRealtimeRequiredType accountingRealtimeRequired)
          Sets the value of the Accounting-Realtime-Required AVP, of type Enumerated.
 void setAccountingRecordNumber(long accountingRecordNumber)
          Sets the value of the Accounting-Record-Number AVP, of type Unsigned32.
 void setAccountingRecordType(AccountingRecordType accountingRecordType)
          Sets the value of the Accounting-Record-Type AVP, of type Enumerated.
 void setAccountingSessionId(byte[] accountingSessionId)
          Sets the value of the Accounting-Session-Id AVP, of type OctetString.
 void setAccountingSubSessionId(long accountingSubSessionId)
          Sets the value of the Accounting-Sub-Session-Id AVP, of type Unsigned64.
 void setAcctApplicationId(long acctApplicationId)
          Sets the value of the Acct-Application-Id AVP, of type Unsigned32.
 void setAcctInterimInterval(long acctInterimInterval)
          Sets the value of the Acct-Interim-Interval AVP, of type Unsigned32.
 void setAcctMultiSessionId(java.lang.String acctMultiSessionId)
          Sets the value of the Acct-Multi-Session-Id AVP, of type UTF8String.
 void setErrorReportingHost(DiameterIdentityAvp errorReportingHost)
          Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
 void setEventTimestamp(java.util.Date eventTimestamp)
          Sets the value of the Event-Timestamp AVP, of type Time.
 void setOriginStateId(long originStateId)
          Sets the value of the Origin-State-Id AVP, of type Unsigned32.
 void setProxyInfo(ProxyInfoAvp proxyInfo)
          Sets a single Proxy-Info AVP in the message, of type Grouped.
 void setProxyInfos(ProxyInfoAvp[] proxyInfos)
          Sets the set of Proxy-Info AVPs, with all the values in the given array.
 void setResultCode(long resultCode)
          Sets the value of the Result-Code AVP, of type Unsigned32.
 void setUserName(java.lang.String userName)
          Sets the value of the User-Name AVP, of type UTF8String.
 void setVendorSpecificApplicationId(VendorSpecificApplicationIdAvp vendorSpecificApplicationId)
          Sets the value of the Vendor-Specific-Application-Id AVP, of type Grouped.
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.DiameterMessage
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getExtensionAvps, getHeader, getOriginHost, getOriginRealm, getSessionId, hasOriginHost, hasOriginRealm, hasSessionId, setDestinationHost, setDestinationRealm, setExtensionAvps, setOriginHost, setOriginRealm, setSessionId
 

Field Detail

commandCode

static final int commandCode
See Also:
Constant Field Values
Method Detail

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. Use hasResultCode() to check the existence of this AVP.

Returns:
the value of the Result-Code AVP
Throws:
java.lang.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.

Throws:
java.lang.IllegalStateException - if setResultCode has already been called

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:
java.lang.IllegalStateException - if setAccountingRecordType has already been called

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:
java.lang.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.

Throws:
java.lang.IllegalStateException - if setAccountingRecordNumber has already been called

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:
java.lang.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.

Throws:
java.lang.IllegalStateException - if setAcctApplicationId has already been called

hasVendorSpecificApplicationId

boolean hasVendorSpecificApplicationId()
Returns true if the Vendor-Specific-Application-Id AVP is present in the message.


getVendorSpecificApplicationId

VendorSpecificApplicationIdAvp getVendorSpecificApplicationId()
Returns the value of the Vendor-Specific-Application-Id AVP, of type Grouped.

Returns:
the value of the Vendor-Specific-Application-Id AVP or null if it has not been set on this message

setVendorSpecificApplicationId

void setVendorSpecificApplicationId(VendorSpecificApplicationIdAvp vendorSpecificApplicationId)
Sets the value of the Vendor-Specific-Application-Id AVP, of type Grouped.

Throws:
java.lang.IllegalStateException - if setVendorSpecificApplicationId has already been called

hasUserName

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


getUserName

java.lang.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(java.lang.String userName)
Sets the value of the User-Name AVP, of type UTF8String.

Throws:
java.lang.IllegalStateException - if setUserName has already been called

hasAccountingSubSessionId

boolean hasAccountingSubSessionId()
Returns true if the Accounting-Sub-Session-Id AVP is present in the message.


getAccountingSubSessionId

long getAccountingSubSessionId()
Returns the value of the Accounting-Sub-Session-Id AVP, of type Unsigned64. Use hasAccountingSubSessionId() to check the existence of this AVP.

Returns:
the value of the Accounting-Sub-Session-Id AVP
Throws:
java.lang.IllegalStateException - if the Accounting-Sub-Session-Id AVP has not been set on this message

setAccountingSubSessionId

void setAccountingSubSessionId(long accountingSubSessionId)
Sets the value of the Accounting-Sub-Session-Id AVP, of type Unsigned64.

Throws:
java.lang.IllegalStateException - if setAccountingSubSessionId has already been called

hasAccountingSessionId

boolean hasAccountingSessionId()
Returns true if the Accounting-Session-Id AVP is present in the message.


getAccountingSessionId

byte[] getAccountingSessionId()
Returns the value of the Accounting-Session-Id AVP, of type OctetString.

Returns:
the value of the Accounting-Session-Id AVP or null if it has not been set on this message

setAccountingSessionId

void setAccountingSessionId(byte[] accountingSessionId)
Sets the value of the Accounting-Session-Id AVP, of type OctetString.

Throws:
java.lang.IllegalStateException - if setAccountingSessionId has already been called

hasAcctMultiSessionId

boolean hasAcctMultiSessionId()
Returns true if the Acct-Multi-Session-Id AVP is present in the message.


getAcctMultiSessionId

java.lang.String getAcctMultiSessionId()
Returns the value of the Acct-Multi-Session-Id AVP, of type UTF8String.

Returns:
the value of the Acct-Multi-Session-Id AVP or null if it has not been set on this message

setAcctMultiSessionId

void setAcctMultiSessionId(java.lang.String acctMultiSessionId)
Sets the value of the Acct-Multi-Session-Id AVP, of type UTF8String.

Throws:
java.lang.IllegalStateException - if setAcctMultiSessionId has already been called

hasErrorReportingHost

boolean hasErrorReportingHost()
Returns true if the Error-Reporting-Host AVP is present in the message.


getErrorReportingHost

DiameterIdentityAvp 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(DiameterIdentityAvp errorReportingHost)
Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.

Throws:
java.lang.IllegalStateException - if setErrorReportingHost has already been called

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:
java.lang.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.

Throws:
java.lang.IllegalStateException - if setAcctInterimInterval has already been called

hasAccountingRealtimeRequired

boolean hasAccountingRealtimeRequired()
Returns true if the Accounting-Realtime-Required AVP is present in the message.


getAccountingRealtimeRequired

AccountingRealtimeRequiredType getAccountingRealtimeRequired()
Returns the value of the Accounting-Realtime-Required AVP, of type Enumerated.

Returns:
the value of the Accounting-Realtime-Required AVP or null if it has not been set on this message

setAccountingRealtimeRequired

void setAccountingRealtimeRequired(AccountingRealtimeRequiredType accountingRealtimeRequired)
Sets the value of the Accounting-Realtime-Required AVP, of type Enumerated.

Throws:
java.lang.IllegalStateException - if setAccountingRealtimeRequired has already been called

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:
java.lang.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.

Throws:
java.lang.IllegalStateException - if setOriginStateId has already been called

hasEventTimestamp

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


getEventTimestamp

java.util.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(java.util.Date eventTimestamp)
Sets the value of the Event-Timestamp AVP, of type Time.

Throws:
java.lang.IllegalStateException - if setEventTimestamp has already been called

getProxyInfos

ProxyInfoAvp[] 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(ProxyInfoAvp proxyInfo)
Sets a single Proxy-Info AVP in the message, of type Grouped.

Throws:
java.lang.IllegalStateException - if setProxyInfo or setProxyInfos has already been called

setProxyInfos

void setProxyInfos(ProxyInfoAvp[] 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:
java.lang.IllegalStateException - if setProxyInfo or setProxyInfos has already been called


Copyright © 2008. All Rights Reserved.