The RoChargingResults class is created from the contents of the Credit Control Answer (CCA) response and is returned back to the application that has invoked one of the following methods: sendCCInital(), sendCCUpdate(), sendCCTermination(), getCCBalanceCheck(), sendCCDirectDebit(), and getCCServicePriceEnquiry().
The RoChargingResults class is a representation of the information contained in the AVPs of the CCA message received by the Diameter Enabler in response to the Credit Control Request (CCR) that it sent out. The Diameter Enabler extracts the set of AVPs held in the CCA and populates the fields of the RoChargingResults class with the value information from each AVP. For example, if the CCA contains a Cost-Information AVP, then the field in the RoChargingResults object will have the Cost-Information variable set to the value of the Cost-Information AVP. Because the Cost-Information is a grouped AVP, the data object assigned to the variable is of type "CostInformation" which also contains fields representing AVPs that are included inside the Cost-Information AVP.
An application can interrogate the contents of the RoChargingResults class with simple getter methods. If an AVP is in the CCA frame directly, then it is included as an instance variable of the RoChargingResults class. If the AVP is included in a grouped AVP (for example, Cost-Information), then the grouped AVP is represented as an instance variable of the RoChargingResults class while the AVPs that it holds (for example, UnitValue, CurrencyCode, and CostUnit) are represented by an instance variable of the class representing the grouped AVP (the Cost-Information class).
RoChargingResults roChargingResults = svc.sendCCInitial(roChargingInfo); MultipleServicesCreditControl mscc = roResult.getMultipleServicesCreditControl(); //The client can request 30 more seconds of Time Quota before Reauthorization is required. Integer timeQuotaThresh = mscc.getTimeQuotaThreshold(); //Example value = 30. //The client has been granted 60 seconds of Time Quota. GrantedServiceUnit gsu = mscc.getGrantedServiceUnit(); Integer grantedTimeUnits = gsu.getCcTime(); //Example value = 60 //Unit cost is 3 US Dollars per minute CostInformation costInfo = roResult.getCostInformation(); String costUnit = costInfo.getCostUnit(); //Example value = "Access to this service is 3.00 a minute." Integer currencyCode = costInfo.getCurrencyCode(); //Example Value = 840 (USD) UnitValue unitValue = costInfo.getUnitValue(); Integer exponent = unitValue.getExponent(); //Example value = 1
Method Name | Type | Returns | Example values/comments |
---|---|---|---|
getSessionId() |
String |
SessionId |
Gets the SessionId for this session |
getResultCode() |
Integer |
getResultCode |
1xxx - Information 2xxx - Success Others - handled through exceptions. |
getOriginHost() |
String |
OriginHost |
The fully qualified domain name of the host orginating the CCA reply. |
getOriginRealm() |
String |
OriginRealm |
The fully qualified domain name of the realm where the OCS resides that originated the CCA reply. |
getAuthApplicationId() |
Integer |
AuthApplicationId |
A value of 4 for Credit Control Applicaton |
getCCRequestType() |
Integer |
CCRequestType |
This Enumeration contains the following:
Note: This value will be overridden if using a non-raw method. |
getCCRequestNumber() |
Integer |
CCRequestNumber |
Indicates the numbered request within a session. This should be set to 0 for Request Types of Initial and event. It should be incremented by one for each subsequent request within a session. |
getCCSessionFailover() |
Integer |
CCSessionFailover |
Indicates whether or not the OCS Supports failover
to an alternative Server K \keeping an active session alive. Note, if configured
properly, failover will happen automatically through the Diameter Enabler
base for a specific destination realm.
|
getMultipleServicesCreditControl() |
MultipleServicesCreditControl |
MultipleServicesCreditControl |
Contains all fields for quota management. |
getCostInformation() |
CostInformation |
CostInformation |
Contains the cost of a service that the CTF can pass back to the subscriber. |
getCreditControlFailureHandling() |
Integer |
CreditControlFailureHandling |
Holds information telling the CTF what action to
take when a transaction times out or some other outage prevents the CTF from
completing update transactions.
|