net.java.slee.resource.diameter.cca.events.avp
Interface CostInformationAvp

All Superinterfaces:
java.lang.Cloneable, net.java.slee.resource.diameter.base.events.avp.DiameterAvp, net.java.slee.resource.diameter.base.events.avp.GroupedAvp
All Known Implementing Classes:
CostInformationAvpImpl

public interface CostInformationAvp
extends net.java.slee.resource.diameter.base.events.avp.GroupedAvp

 8.7. Cost-Information AVP

        
   The Cost-Information AVP (AVP Code 423) is of type Grouped, and it is
   used to return the cost information of a service, which the credit-
   control client can transfer transparently to the end user.  The
   included Unit-Value AVP contains the cost estimate (always type of
   money) of the service, in the case of price enquiry, or the
   accumulated cost estimation, in the case of credit-control session.

   The Currency-Code specifies in which currency the cost was given.
   The Cost-Unit specifies the unit when the service cost is a cost per
   unit (e.g., cost for the service is $1 per minute).

   When the Requested-Action AVP with value PRICE_ENQUIRY is included in
   the Credit-Control-Request command, the Cost-Information AVP sent in
   the succeeding Credit-Control-Answer command contains the cost
   estimation of the requested service, without any reservation being
   made.

   The Cost-Information AVP included in the Credit-Control-Answer
   command with the CC-Request-Type set to UPDATE_REQUEST contains the
   accumulated cost estimation for the session, without taking any
   credit reservation into account.
   The Cost-Information AVP included in the Credit-Control-Answer
   command with the CC-Request-Type set to EVENT_REQUEST or
   TERMINATION_REQUEST contains the estimated total cost for the
   requested service.

   It is defined as follows (per the grouped-avp-def of
   RFC 3588 [DIAMBASE]):

                Cost-Information ::= < AVP Header: 423 >
                                     { Unit-Value }
                                     { Currency-Code }
                                     [ Cost-Unit ]
        

Author:
Bartosz Baranowski , Alexandre Mendonca

Field Summary
 
Fields inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
 
Method Summary
 java.lang.String getCostUnit()
          Returns the value of the Cost-Unit AVP, of type UTF8String.
 long getCurrencyCode()
          Returns the value of the Currency-Code AVP, of type Unsigned32.
 UnitValueAvp getUnitValue()
          Returns the value of the Unit-Value AVP, of type Grouped.
 boolean hasCostUnit()
          Returns true if the Cost-Unit AVP is present in the message.
 boolean hasCurrencyCode()
          Returns true if the Currency-Code AVP is present in the message.
 boolean hasUnitValue()
          Returns true if the Unit-Value AVP is present in the message.
 void setCostUnit(java.lang.String costUnit)
          Sets the value of the Cost-Unit AVP, of type UTF8String.
 void setCurrencyCode(long currencyCode)
          Sets the value of the Currency-Code AVP, of type Unsigned32.
 void setUnitValue(UnitValueAvp unitValue)
          Sets the value of the Unit-Value AVP, of type Grouped.
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.avp.GroupedAvp
getExtensionAvps, setExtensionAvps
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorId, intValue, longValue, octetStringValue, stringValue
 

Method Detail

getCostUnit

java.lang.String getCostUnit()
Returns the value of the Cost-Unit AVP, of type UTF8String. Return value of null indicates that its not present.

Returns:

getCurrencyCode

long getCurrencyCode()
Returns the value of the Currency-Code AVP, of type Unsigned32. Return value of null indicates that its not present. See: ISO 4217 standard [ISO4217] for defined values;

Returns:

getUnitValue

UnitValueAvp getUnitValue()
Returns the value of the Unit-Value AVP, of type Grouped. Return value of null indicates that its not present See: UnitValueAvp .

Returns:

hasCostUnit

boolean hasCostUnit()
Returns true if the Cost-Unit AVP is present in the message.

Returns:

hasCurrencyCode

boolean hasCurrencyCode()
Returns true if the Currency-Code AVP is present in the message.

Returns:

hasUnitValue

boolean hasUnitValue()
Returns true if the Unit-Value AVP is present in the message.

Returns:

setCostUnit

void setCostUnit(java.lang.String costUnit)
Sets the value of the Cost-Unit AVP, of type UTF8String.

Parameters:
costUnit -

setCurrencyCode

void setCurrencyCode(long currencyCode)
Sets the value of the Currency-Code AVP, of type Unsigned32.

Parameters:
currencyCode -

setUnitValue

void setUnitValue(UnitValueAvp unitValue)
Sets the value of the Unit-Value AVP, of type Grouped. See: UnitValueAvp .

Parameters:
unitValue -


Copyright © 2012. All Rights Reserved.