WebSphere brand IBM WebSphere IP Multimedia Subsystem Connector, Version 6.2

Receive Graceful Service Termination Request - Terminate

This example shows the receiving of a graceful service termination request to terminate the credit control session.

In the following snippet, the client application retrieves the RoChargingResults object returned by the sendCCUpdate method. The client examines key pieces of information, such as the GrantedServiceUnit and CostInformation. In this example, the Online Charging System (OCS) returns a Final-Unit-Indication, indicating that the final allocation of quota has been issued in the Granted-Service-Units. The final unit action indicates that the client must terminate the charging session after the granted service units have been used

Example

RoChargingResults roChargingResults = svc.sendCCUpdate(roChargingInfo);

		MultipleServicesCreditControl mscc = roResult.getMultipleServicesCreditControl();
			
		GrantedServiceUnit gsu = mscc.getGrantedServiceUnit();
		Integer grantedTimeUnits = gsu.getCcTime();
			
		CostInformation costInfo = roResult.getCostInformation();
		
		String costUnit = costInfo.getCostUnit();
		Integer currencyCode = costInfo.getCurrencyCode();
		
		UnitValue unitValue = costInfo.getUnitValue();
		Integer exponent = unitValue.getExponent();
		Long valueDigits = unitValue.getValueDigits();

		FinalUnitIndication finalInd = roResult.getMultipleServicesCreditControl().getFinalUnitIndication();
		finalInd.getFinalUnitAction();  //Example value = TERMINATE



Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.