com.ibm.diameter.charging.util
Class RoChargingInfo

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

public class RoChargingInfo
extends java.lang.Object

RoChargingInfo is a lightweight representation of the Credit-Control-Request (CCR) command. It includes all of the basic informational elements needed to manage online charging for Events or Sessions. The online client (Charging Trigger Function (CTF)) requests resource allocation and reports credit control usage information to the Online Charging System (OCS). For online charging, the Diameter Credit Control Application (DCCA)), defined in RFC 4006, is used with extensions based on the 3GPP IMS specifications. The RoChargingInfo object is provided as the sole argument to all credit control web service methods.

The Ro CCR 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
RoChargingInfo()
          Constructs an empty RoChargingInfo object representing the CCR command.
RoChargingInfo(java.util.List<Avp> avps)
          Constructs a RoChargingInfo object representing the CCR Command.
 
Method Summary
 java.lang.Integer getCcRequestNumber()
          Gets the value corresponding to the payload of the {CC-Request-Number} Avp.
 java.lang.String getDestinationHost()
          Gets the value corresponding to the payload of the [Destination-Host] Avp.
 java.lang.String getDestinationRealm()
          Gets the value corresponding to the payload of the {Destination-Realm} Avp.
 java.lang.Long getEventTimestamp()
          Gets the value corresponding to the payload of the [Event-Timestamp] Avp.
 MultipleServicesCreditControl[] getMultipleServicesCreditControls()
          Gets the values corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.
 java.lang.Integer getMultipleServicesIndicator()
          Gets the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.
 java.lang.Integer getOriginStateId()
          Gets the value corresponding to the payload of the [Origin-State-Id] Avp.
 java.lang.String getServiceContextId()
          Gets the value corresponding to the payload of the {Service-Context-Id} 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.
 SubscriptionId[] getSubscriptionIds()
          Gets the values corresponding to the payloads of the [Subscription-Id] Avps.
 java.lang.Integer getTerminationCause()
          Gets the value corresponding to the payload of the [Termination-Cause] Avp.
 UserEquipmentInfo getUserEquipmentInfo()
          Gets the value corresponding to the payload of the [User-Equipment-Info] Avp.
 java.lang.String getUserName()
          Gets the value corresponding to the payload of the [User-Name] Avp.
 void setCcRequestNumber(java.lang.Integer ccRequestNumber)
          Sets the value corresponding to the payload of the {CC-Request-Number} Avp.
 void setDestinationHost(java.lang.String destinationHost)
          Sets the value corresponding to the payload of the [Destination-Host] Avp.
 void setDestinationRealm(java.lang.String destinationRealm)
          Sets the value corresponding to the payload of the {Destination-Realm} Avp.
 void setEventTimestamp(java.lang.Long eventTimestamp)
          Sets the value corresponding to the payload of the [Event-Timestamp] Avp.
 void setMultipleServicesCreditControls(MultipleServicesCreditControl[] multipleServicesCreditControls)
          Sets the value corresponding to the payloads of the [Multiple-Services-Credit-Control] Avps.
 void setMultipleServicesIndicator(java.lang.Integer multipleServicesIndicator)
          Sets the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.
 void setOriginStateId(java.lang.Integer originStateId)
          Sets the value corresponding to the payload of the [Origin-State-Id] Avp.
 void setServiceContextId(java.lang.String serviceContextId)
          Sets the value corresponding to the payload of the {Service-Context-Id} 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.
 void setSubscriptionIds(SubscriptionId[] subscriptionIds)
          Sets the values corresponding to the payloads of the [Subscription-Id] Avps.
 void setTerminationCause(java.lang.Integer terminationCause)
          Sets the value corresponding to the payload of the [Termination-Cause] Avp.
 void setUserEquipmentInfo(UserEquipmentInfo userEquipmentInfo)
          Sets the value corresponding to the payload of the [User-Equipment-Info] Avp.
 void setUserName(java.lang.String userName)
          Sets the value corresponding to the payload of the [User-Name] Avp.
 java.util.Vector toAvps()
          Transforms a RoChargingInfo object into a Vector of Avps that forms the body of the CCR Diameter Packet.
 void validate()
          Validates the members of the RoChargingInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoChargingInfo

public RoChargingInfo()
Constructs an empty RoChargingInfo object representing the CCR command.


RoChargingInfo

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

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of RoChargingInfo, 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 RAR
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.

getDestinationHost

public java.lang.String getDestinationHost()
Gets the value corresponding to the payload of the [Destination-Host] Avp.

Returns:
the value corresponding to the payload of the [Destination-Host] Avp.

setDestinationHost

public void setDestinationHost(java.lang.String destinationHost)
Sets the value corresponding to the payload of the [Destination-Host] Avp.

Parameters:
destinationHost - the value corresponding to the payload of the [Destination-Host] Avp.

getDestinationRealm

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

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

setDestinationRealm

public void setDestinationRealm(java.lang.String destinationRealm)
Sets the value corresponding to the payload of the {Destination-Realm} Avp.

Parameters:
destinationRealm - the value corresponding to the payload of the {Destination-Realm} Avp.

getEventTimestamp

public java.lang.Long getEventTimestamp()
Gets the value corresponding to the payload of the [Event-Timestamp] Avp.

Returns:
the value corresponding to the payload of the [Event-Timestamp] Avp.

setEventTimestamp

public void setEventTimestamp(java.lang.Long eventTimestamp)
Sets the value corresponding to the payload of the [Event-Timestamp] Avp.

Parameters:
eventTimestamp - the value corresponding to the payload of the [Event-Timestamp] 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.

getMultipleServicesIndicator

public java.lang.Integer getMultipleServicesIndicator()
Gets the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.

Returns:
the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.

setMultipleServicesIndicator

public void setMultipleServicesIndicator(java.lang.Integer multipleServicesIndicator)
Sets the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.

Parameters:
multipleServicesIndicator - the value corresponding to the payload of the [Multiple-Services-Indicator] Avp.

getOriginStateId

public java.lang.Integer getOriginStateId()
Gets the value corresponding to the payload of the [Origin-State-Id] Avp.

Returns:
the value corresponding to the payload of the [Origin-State-Id] Avp.

setOriginStateId

public void setOriginStateId(java.lang.Integer originStateId)
Sets the value corresponding to the payload of the [Origin-State-Id] Avp.

Parameters:
originStateId - the value corresponding to the payload of the [Origin-State-Id] Avp.

getServiceContextId

public java.lang.String getServiceContextId()
Gets the value corresponding to the payload of the {Service-Context-Id} Avp.

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

setServiceContextId

public void setServiceContextId(java.lang.String serviceContextId)
Sets the value corresponding to the payload of the {Service-Context-Id} Avp.

Parameters:
serviceContextId - the value corresponding to the payload of the {Service-Context-Id} Avp.

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.

getSubscriptionIds

public SubscriptionId[] getSubscriptionIds()
Gets the values corresponding to the payloads of the [Subscription-Id] Avps.

Returns:
the values corresponding to the payloads of the [Subscription-Id] Avps.

setSubscriptionIds

public void setSubscriptionIds(SubscriptionId[] subscriptionIds)
Sets the values corresponding to the payloads of the [Subscription-Id] Avps.

Parameters:
subscriptionId - the values corresponding to the payloads of the [Subscription-Id] Avps.

getTerminationCause

public java.lang.Integer getTerminationCause()
Gets the value corresponding to the payload of the [Termination-Cause] Avp.

Returns:
the value corresponding to the payload of the [Termination-Cause] Avp.

setTerminationCause

public void setTerminationCause(java.lang.Integer terminationCause)
Sets the value corresponding to the payload of the [Termination-Cause] Avp.

Parameters:
terminationCause - the value corresponding to the payload of the [Termination-Cause] Avp.

getUserEquipmentInfo

public UserEquipmentInfo getUserEquipmentInfo()
Gets the value corresponding to the payload of the [User-Equipment-Info] Avp.

Returns:
the value corresponding to the payload of the [User-Equipment-Info] Avp.

setUserEquipmentInfo

public void setUserEquipmentInfo(UserEquipmentInfo userEquipmentInfo)
Sets the value corresponding to the payload of the [User-Equipment-Info] Avp.

Parameters:
userEquipmentInfo - the value corresponding to the payload of the [User-Equipment-Info] Avp.

getUserName

public java.lang.String getUserName()
Gets the value corresponding to the payload of the [User-Name] Avp.

Returns:
the value corresponding to the payload of the [User-Name] Avp.

setUserName

public void setUserName(java.lang.String userName)
Sets the value corresponding to the payload of the [User-Name] Avp.

Parameters:
userName - the value corresponding to the payload of the [User-Name] Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the RoChargingInfo object. The Ro Web Service calls this method before sending the CCR Diameter packet. This ensures that improperly formatted members are not sent to the OCS.

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

toAvps

public java.util.Vector toAvps()
                        throws AvpTransformationException
Transforms a RoChargingInfo object into a Vector of Avps that forms the body of the CCR Diameter Packet.

All non-null members of RoChargingInfo will be created as Avps in the Vector.

Returns:
the Vector of Avps that form the CCR Diameter Packet.
Throws:
AvpTransformationException - if a member of RoChargingInfo is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.