com.ibm.diameter.charging.util
Class FinalUnitIndication

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

public class FinalUnitIndication
extends java.lang.Object

FinalUnitIndication is a lightweight representation of the Grouped [Final-Unit-Indication] Avp. The FinalUnitIndication indicates that the GrantedServiceUnit in RoChargingResults contains the final units of quota for the service. The credit-control client is responsible for executing the FinalUnitAction when the quota expires. If the action is REDIRECT, the client can redirect to a Top-Up server to request more quota.

The [Cost-Information] Avp is defined in RFC 4006 - Diameter Credit-Control Application.


Constructor Summary
FinalUnitIndication()
          Constructs an empty FinalUnitIndication object representing the [Final-Unit-Indication] Avp.
FinalUnitIndication(java.util.List<Avp> avps)
          Constructs a FinalUnitIndication object representing the Grouped [Final-Unit-Indication] Avp.
 
Method Summary
 java.lang.String[] getFilterIds()
          Gets the value corresponding to the payload of the [Filter-Id] Avp.
 java.lang.Integer getFinalUnitAction()
          Gets the value corresponding to the payload of the {Final-Unit-Action} Avp.
 RedirectServer getRedirectServer()
          Gets the value corresponding to the payload of the [Redirect-Server] Avp.
 java.lang.String[] getRestrictionFilterRules()
          Gets the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.
 void setFilterIds(java.lang.String[] filterIds)
          Sets the value corresponding to the payload of the [Filter-Id] Avp.
 void setFinalUnitAction(java.lang.Integer finalUnitAction)
          Sets the value corresponding to the payload of the {Final-Unit-Action} Avp.
 void setRedirectServer(RedirectServer redirectServer)
          Sets the value corresponding to the payload of the [Redirect-Server] Avp.
 void setRestrictionFilterRules(java.lang.String[] restrictionFilterRules)
          Sets the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.
 Avp toAvp()
          Transforms a FinalUnitIndication object into a Grouped [Final-Unit-Indication] Avp.
 void validate()
          Validates the members of the FinalUnitIndication object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalUnitIndication

public FinalUnitIndication()
Constructs an empty FinalUnitIndication object representing the [Final-Unit-Indication] Avp.


FinalUnitIndication

public FinalUnitIndication(java.util.List<Avp> avps)
                    throws AvpTransformationException
Constructs a FinalUnitIndication object representing the Grouped [Final-Unit-Indication] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of FinalUnitIndication, 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 [Final-Unit-Indication] Avp.
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getFilterIds

public java.lang.String[] getFilterIds()
Gets the value corresponding to the payload of the [Filter-Id] Avp.

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

setFilterIds

public void setFilterIds(java.lang.String[] filterIds)
Sets the value corresponding to the payload of the [Filter-Id] Avp.

Parameters:
filterIds - the value corresponding to the payload of the [Filter-Id] Avp.

getFinalUnitAction

public java.lang.Integer getFinalUnitAction()
Gets the value corresponding to the payload of the {Final-Unit-Action} Avp.

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

setFinalUnitAction

public void setFinalUnitAction(java.lang.Integer finalUnitAction)
Sets the value corresponding to the payload of the {Final-Unit-Action} Avp.

Parameters:
finalUnitAction - the value corresponding to the payload of the {Final-Unit-Action} Avp.

getRedirectServer

public RedirectServer getRedirectServer()
Gets the value corresponding to the payload of the [Redirect-Server] Avp.

Returns:
the value corresponding to the payload of the [Redirect-Server] Avp.

setRedirectServer

public void setRedirectServer(RedirectServer redirectServer)
Sets the value corresponding to the payload of the [Redirect-Server] Avp.

Parameters:
redirectServer - the value corresponding to the payload of the [Redirect-Server] Avp.

getRestrictionFilterRules

public java.lang.String[] getRestrictionFilterRules()
Gets the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.

Returns:
the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.

setRestrictionFilterRules

public void setRestrictionFilterRules(java.lang.String[] restrictionFilterRules)
Sets the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.

Parameters:
restrictionFilterRules - the value corresponding to the payload of the [Restriction-Filter-Rules] Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the FinalUnitIndication 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 FinalUnitIndication is in an unexpected format.

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a FinalUnitIndication object into a Grouped [Final-Unit-Indication] Avp.

All non-null members of FinalUnitIndication will be transformed into Avps nested inside of the [Final-Unit-Indication] Avp.

Returns:
the [Final-Unit-Indication] Avp.
Throws:
AvpTransformationException - if a member of FinalUnitIndication is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.