com.ibm.diameter.charging.util
Class GSUPoolReference

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

public class GSUPoolReference
extends java.lang.Object

GSUPoolReference is a lightweight representation of the Grouped [G-S-U-Pool-Reference] Avp. The GSUPoolReference is returned in the GrantedServiceUnit of the Credit-Control-Answer and associates the quota with a credit pool.

The [G-S-U-Pool-Reference] Avp is defined in RFC 4006 - Diameter Credit-Control Application.


Constructor Summary
GSUPoolReference()
          Constructs an empty GSUPoolReference object representing the [G-S-U-Pool-Reference] Avp.
GSUPoolReference(java.util.List<Avp> avps)
          Constructs a GSUPoolReference object representing the Grouped [G-S-U-Pool-Reference] Avp.
 
Method Summary
 java.lang.Integer getCcUnitType()
          Gets the value corresponding to the payload of the {CC-Unit-Type} Avp.
 java.lang.Integer getGSUPoolIdentifier()
          Gets the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.
 UnitValue getUnitValue()
          Gets the value corresponding to the payload of the {Unit-Value} Avp.
 void setCcUnitType(java.lang.Integer ccUnitType)
          Sets the value corresponding to the payload of the {CC-Unit-Type} Avp.
 void setGSUPoolIdentifier(java.lang.Integer poolIdentifier)
          Sets the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.
 void setUnitValue(UnitValue unitValue)
          Sets the value corresponding to the payload of the {Unit-Value} Avp.
 Avp toAvp()
          Transforms a GSUPoolReference object into a Grouped [G-S-U-Pool-Reference] Avp.
 void validate()
          Validates the members of the GSUPoolReference object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GSUPoolReference

public GSUPoolReference()
Constructs an empty GSUPoolReference object representing the [G-S-U-Pool-Reference] Avp.


GSUPoolReference

public GSUPoolReference(java.util.List<Avp> avps)
                 throws AvpTransformationException
Constructs a GSUPoolReference object representing the Grouped [G-S-U-Pool-Reference] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of GSUPoolReference, 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 Grouped [G-S-U-Pool-Reference] Avp.
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getGSUPoolIdentifier

public java.lang.Integer getGSUPoolIdentifier()
Gets the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.

Returns:
the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.

setGSUPoolIdentifier

public void setGSUPoolIdentifier(java.lang.Integer poolIdentifier)
Sets the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.

Parameters:
poolIdentifier - the value corresponding to the payload of the {G-S-U-Pool-Identifier} Avp.

getCcUnitType

public java.lang.Integer getCcUnitType()
Gets the value corresponding to the payload of the {CC-Unit-Type} Avp.

Returns:
the value corresponding to the payload of the {CC-Unit-Type} Avp.

setCcUnitType

public void setCcUnitType(java.lang.Integer ccUnitType)
Sets the value corresponding to the payload of the {CC-Unit-Type} Avp.

Parameters:
ccUnitType - the value corresponding to the payload of the {CC-Unit-Type} Avp.

getUnitValue

public UnitValue getUnitValue()
Gets the value corresponding to the payload of the {Unit-Value} Avp.

Returns:
the value corresponding to the payload of the {Unit-Value} Avp.

setUnitValue

public void setUnitValue(UnitValue unitValue)
Sets the value corresponding to the payload of the {Unit-Value} Avp.

Parameters:
unitValue - the value corresponding to the payload of the {Unit-Value} Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the GSUPoolReference object. The charging Web Services call this method before transforming the object into a Grouped Avp. This ensures that improperly formed Avps are not sent to the Diameter peer.

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a GSUPoolReference object into a Grouped [G-S-U-Pool-Reference] Avp.

All non-null members of GSUPoolReference will be transformed into Avps nested inside of the [G-S-U-Pool-Reference] Avp.

Returns:
the [G-S-U-Pool-Reference] Avp.
Throws:
AvpTransformationException - if a member of GSUPoolReference is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.