com.ibm.diameter.charging.util
Class RoChargingResults

java.lang.Object
  extended by com.ibm.diameter.charging.util.RoChargingResults

public class RoChargingResults
extends java.lang.Object

The RoChargingResults class is a simple representation of the Diameter Credit-Control-Answer (CCA) command. It contains all the pertinent information returned by the OCS that a credit-control application needs to manage an online credit session.

The Ro CCA command is defined in ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications, which references RFC 4006 - Diameter Credit-Control Application.


Constructor Summary
RoChargingResults()
          Constructs an empty RoChargingResults object representing the CCA command.
RoChargingResults(java.util.List<Avp> avps)
          Constructs a RoChargingResults object representing the CCA Command.
 
Method Summary
 java.lang.Integer getAuthApplicationId()
          Gets the value corresponding to the payload of the {Auth-Application-Id} Avp.
 java.lang.Integer getCcRequestNumber()
          Gets the value corresponding to the payload of the {CC-Request-Number} Avp.
 java.lang.Integer getCcSessionFailover()
          Gets the value corresponding to the payload of the [CC-Session-Failover] Avp.
 CostInformation getCostInformation()
          Gets the value corresponding to the payload of the [Cost-Information] Avp.
 java.lang.Integer getCreditControlFailureHandling()
          Gets the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.
 MultipleServicesCreditControl[] getMultipleServicesCreditControls()
          Gets the values corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.
 java.lang.String getOriginHost()
          Gets the value corresponding to the payload of the {Origin-Host} Avp.
 java.lang.String getOriginRealm()
          Gets the value corresponding to the payload of the {Origin-Realm} Avp.
 ServiceInformation getServiceInformation()
          Gets the value corresponding to the payload of the [Service-Information] Avp.
 java.lang.String getSessionId()
          Gets the value corresponding to the payload of the {Session-Id} Avp.
 void setAuthApplicationId(java.lang.Integer authApplicationId)
          Sets the value corresponding to the payload of the {Auth-Application-Id} Avp.
 void setCcRequestNumber(java.lang.Integer ccRequestNumber)
          Sets the value corresponding to the payload of the {CC-Request-Number} Avp.
 void setCcSessionFailover(java.lang.Integer ccSessionFailover)
          Sets the value corresponding to the payload of the [CC-Session-Failover] Avp.
 void setCostInformation(CostInformation costInformation)
          Sets the value corresponding to the payload of the [Cost-Information] Avp.
 void setCreditControlFailureHandling(java.lang.Integer creditControlFailureHandling)
          Sets the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.
 void setMultipleServicesCreditControls(MultipleServicesCreditControl[] multipleServicesCreditControls)
          Sets the value corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.
 void setOriginHost(java.lang.String originHost)
          Sets the value corresponding to the payload of the {Origin-Host} Avp.
 void setOriginRealm(java.lang.String originRealm)
          Sets the value corresponding to the payload of the {Origin-Realm} Avp.
 void setServiceInformation(ServiceInformation serviceInformation)
          Sets the value corresponding to the payload of the [Service-Information] Avp.
 void setSessionId(java.lang.String sessionId)
          Sets the value corresponding to the payload of the {Session-Id} Avp.
 java.util.Vector toAvps()
          Transforms the RoChargingResults object into a Vector of Avps.
 void validate()
          Validates the members of the RoChargingResults object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoChargingResults

public RoChargingResults()
Constructs an empty RoChargingResults object representing the CCA command.


RoChargingResults

public RoChargingResults(java.util.List<Avp> avps)
                  throws AvpTransformationException
Constructs a RoChargingResults object representing the CCA Command.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of RoChargingResults, the member will be populated with the Avp value during construction. If an Avp code is unknown, the value will be silently discarded.

Parameters:
avps - a list of Avps that can appear in the CCA
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getCcRequestNumber

public java.lang.Integer getCcRequestNumber()
Gets the value corresponding to the payload of the {CC-Request-Number} Avp.

Returns:
the value corresponding to the payload of the {CC-Request-Number} Avp.

setCcRequestNumber

public void setCcRequestNumber(java.lang.Integer ccRequestNumber)
Sets the value corresponding to the payload of the {CC-Request-Number} Avp.

Parameters:
ccRequestNumber - the value corresponding to the payload of the {CC-Request-Number} Avp.

getMultipleServicesCreditControls

public MultipleServicesCreditControl[] getMultipleServicesCreditControls()
Gets the values corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.

Returns:
the values corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.

setMultipleServicesCreditControls

public void setMultipleServicesCreditControls(MultipleServicesCreditControl[] multipleServicesCreditControls)
Sets the value corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.

Parameters:
multipleServicesCreditControl - the values corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.

getServiceInformation

public ServiceInformation getServiceInformation()
Gets the value corresponding to the payload of the [Service-Information] Avp.

Returns:
the value corresponding to the payload of the [Service-Information] Avp.

setServiceInformation

public void setServiceInformation(ServiceInformation serviceInformation)
Sets the value corresponding to the payload of the [Service-Information] Avp.

Parameters:
serviceInformation - the value corresponding to the payload of the [Service-Information] Avp.

getSessionId

public java.lang.String getSessionId()
Gets the value corresponding to the payload of the {Session-Id} Avp.

Returns:
the value corresponding to the payload of the {Session-Id} Avp.

setSessionId

public void setSessionId(java.lang.String sessionId)
Sets the value corresponding to the payload of the {Session-Id} Avp.

Parameters:
sessionId - the value corresponding to the payload of the {Session-Id} Avp.

getAuthApplicationId

public java.lang.Integer getAuthApplicationId()
Gets the value corresponding to the payload of the {Auth-Application-Id} Avp.

Returns:
the value corresponding to the payload of the {Auth-Application-Id} Avp.

setAuthApplicationId

public void setAuthApplicationId(java.lang.Integer authApplicationId)
Sets the value corresponding to the payload of the {Auth-Application-Id} Avp.

Parameters:
authApplicationId - the value corresponding to the payload of the {Auth-Application-Id} Avp.

getCcSessionFailover

public java.lang.Integer getCcSessionFailover()
Gets the value corresponding to the payload of the [CC-Session-Failover] Avp.

Returns:
the value corresponding to the payload of the [CC-Session-Failover] Avp.

setCcSessionFailover

public void setCcSessionFailover(java.lang.Integer ccSessionFailover)
Sets the value corresponding to the payload of the [CC-Session-Failover] Avp.

Parameters:
ccSessionFailover - the value corresponding to the payload of the [CC-Session-Failover] Avp.

getCostInformation

public CostInformation getCostInformation()
Gets the value corresponding to the payload of the [Cost-Information] Avp.

Returns:
the value corresponding to the payload of the [Cost-Information] Avp.

setCostInformation

public void setCostInformation(CostInformation costInformation)
Sets the value corresponding to the payload of the [Cost-Information] Avp.

Parameters:
costInformation - the value corresponding to the payload of the [Cost-Information] Avp.

getCreditControlFailureHandling

public java.lang.Integer getCreditControlFailureHandling()
Gets the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.

Returns:
the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.

setCreditControlFailureHandling

public void setCreditControlFailureHandling(java.lang.Integer creditControlFailureHandling)
Sets the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.

Parameters:
mmsInformation - the value corresponding to the payload of the [Credit-Control-Failure-Handling] Avp.

getOriginHost

public java.lang.String getOriginHost()
Gets the value corresponding to the payload of the {Origin-Host} Avp.

Returns:
the value corresponding to the payload of the {Origin-Host} Avp.

setOriginHost

public void setOriginHost(java.lang.String originHost)
Sets the value corresponding to the payload of the {Origin-Host} Avp.

Parameters:
originHost - the value corresponding to the payload of the {Origin-Host} Avp.

getOriginRealm

public java.lang.String getOriginRealm()
Gets the value corresponding to the payload of the {Origin-Realm} Avp.

Returns:
the value corresponding to the payload of the {Origin-Realm} Avp.

setOriginRealm

public void setOriginRealm(java.lang.String originRealm)
Sets the value corresponding to the payload of the {Origin-Realm} Avp.

Parameters:
originRealm - the value corresponding to the payload of the {Origin-Realm} Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the RoChargingResults object. This method call peforms the same validation that is done by the Ro Web Service.

Throws:
ChargingValidationException - if a member of RoChargingResults is in an unexpected format.

toAvps

public java.util.Vector toAvps()
                        throws AvpTransformationException
Transforms the RoChargingResults object into a Vector of Avps.

Returns:
the list of Avps that form the CCA.
Throws:
AvpTransformationException


Copyright © 2006 IBM Corp. All Rights Reserved.