The RfAccountingInfo class includes all of the basic informational elements needed to manage an Accounting Session or Event for offline charging.
The RfAccountingInfo class is a simple representation of the Diameter Accounting Request (ACR) command and includes all of the basic informational elements needed to manage an Accounting Session or Event. The Web service client creates an instance of RfAccountingInfo and must set all required fields before initiating a Web service request.
RfAccountingInfo acctInfo = new RfAccountingInfo(); acctInfo.setSessionId("example.example.com:44321;23433;821;0AB3F12"); acctInfo.setAccountingRecordNumber(0); acctInfo.setDestinationRealm("example.com"); acctInfo.setUserName("alice@example.com"); RfAccountingResult results = service.startRfAccountingInfo(acctInfo);
Method | Type | Returns | Description |
---|---|---|---|
getSessionId | String | sessionId | The sessionId that is unique for this session. Example:
String sessionId = acctInfo.getSessionId(); |
getAccountingRecordNumber | int | accountingRecordNumber | Identifies an accounting message within a session. For a typical single session, the record number for the start is zero, the record number for the interims are 1 through n (where there are n interim messages), and the record number for the stop is n+1 (the final message of the session). |
getUserName | String | userName | The private user identity if available in the node. Example:
String username = acctInfo.getUserName(); |
getAcctInterimInterval | int | acctInterimInterval | The amount of time in seconds whereby the server wishes to receive updates from the application client. It is the responsibility of the client to provide an interim message at the end of each interval. The client may set this field as a hint to the server. |
getDestinationRealm | String | destinationRealm | The administration domain that recognizes the CCF. Example:
String destinationRealm = acctInfo.getDestinationRealm(); |
getEventTimestamp | long | eventTimestamp | The event value for time and MAY be included in ACR and ACA messages to record the time that the reported event occurred. This is specified as milliseconds since January 1, 1970 00:00 UTC. Example:
long eventTimestamp = acctInfo.getEventTimestamp(); |
getOriginStateId | int | originStateId | Holds the value of our Origin-State-Id. Example:
int originStateId = acctInfo.getOriginStateId(); |
getServiceInformation | serviceInformation | serviceInformation | Service-specific 3GPP accounting information. |
Method | Parameter Name | Type | Description |
---|---|---|---|
setSessionId | sessionId | String | Sets the Session-Id for this message. The Session-Id is unique for a given session. The same Session-Id value should be used in every message of that session. Example:
rfAccountingInfo.setSessionId("sipclient.example.com:33041;23432;893); |
setAccountingRecordNumber | accountingRecordNumber | int | Identifies an accounting message within a session. For a typical single session, the record number for the start is zero, the record number for the interims are 1 through n (where there are n interim messages), and the record number for the stop is n+1 (the final message of the session). |
setUserName | userName | String | The private user identity if available in the node. |
setAcctInterimInterval | acctInterimInterval | int | The amount of time in seconds whereby the server wishes to receive updates from the application client. It is the responsibility of the client to provide an interim message at the end of each interval. The client may set this field as a hint to the server. |
setDestinationRealm | destinationRealm | String | The administration domain that recognizes the CCF. |
setEventTimestamp | eventTimestamp | long | The event value for time and MAY be included in ACR and ACA messages to record the time that the reported event occurred, in milliseconds since January 1, 1970 00:00 UTC. Example:
rfAccountingInfo.setEventTimestamp(System.currentTimeMillis()); |
setOriginStateId | originStateId | int | Sets the value of our Origin-State-Id. Note that by setting this, your application will indicate to the server that the Origin State has changed (meaning that he will void any existing sessions). And, once you have set it, you must use the same value for all messages that you initiate. Therefore, if you use this method, you must have complete knowledge of the applications running, and they must be well coordinated. Example:
rfAccountingInfo.setOriginStateId(356777); |
setServiceInformation | serviceInformation | serviceInformation | Service-specific 3GPP accounting information. |