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

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:
GrantedServiceUnitAvpImpl

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

  <b>8.17. Granted-Service-Unit AVP</b>
 
 
   Granted-Service-Unit AVP (AVP Code 431) is of type Grouped and
   contains the amount of units that the Diameter credit-control client
   can provide to the end user until the service must be released or the
   new Credit-Control-Request must be sent.  A client is not required to
   implement all the unit types, and it must treat unknown or
   unsupported unit types in the answer message as an incorrect CCA
   answer.  In this case, the client MUST terminate the credit-control
   session and indicate in the Termination-Cause AVP reason
   DIAMETER_BAD_ANSWER.
 
   The Granted-Service-Unit AVP is defined as follows (per the grouped-
   avp-def of RFC 3588 [DIAMBASE]):
 
      Granted-Service-Unit ::= < AVP Header: 431 >
                                 [ Tariff-Time-Change ]
                                 [ CC-Time ]
                                 [ CC-Money ]
                                 [ CC-Total-Octets ]
                                 [ CC-Input-Octets ]
                                 [ CC-Output-Octets ]
                                 [ CC-Service-Specific-Units ]
                                *[ AVP ]
                                
 

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
 long getCreditControlInputOctets()
          Returns value of the CC-Input-Octets AVP, of type Unsigned64.
 CcMoneyAvp getCreditControlMoneyAvp()
          Returns value of CC-Money avp of type grouped.
 long getCreditControlOutputOctets()
          Returns the value of the CC-Output-Octets AVP, of type Unsigned64.
 long getCreditControlServiceSpecificUnits()
          Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64.
 long getCreditControlTime()
          Returns the value of the CC-Time AVP, of type Unsigned32.
 long getCreditControlTotalOctets()
          Returns value of the CC-Total-Octets AVP, of type Unsigned64.
 java.util.Date getTariffTimeChange()
          Return value of Tariff-Time-Change avp of type time.
 boolean hasCreditControlInputOctets()
          Returns true if CC-Input-Octets AVP is present
 boolean hasCreditControlMoneyAvp()
          Return true if CC-Money avp is present
 boolean hasCreditControlOutputOctets()
          Returns true if CC-Output-Octets AVP is present
 boolean hasCreditControlServiceSpecificUnits()
          Returns true if CC-Servce-Specific-Units AVP is present.
 boolean hasCreditControlTime()
          Returns true if CC-Time AVP is present.
 boolean hasCreditControlTotalOctets()
          Returns true if CC-Total-Octets avp is present
 boolean hasTariffTimeChange()
          Return true if avp is present
 void setCreditControlInputOctets(long ttc)
          Sets the value of the CC-Input-Octets AVP, of type Unsigned64.
 void setCreditControlMoneyAvp(CcMoneyAvp ccm)
          Set value of CC-Money avp of type Grouped.
See: CcMoneyAvp
 void setCreditControlOutputOctets(long ccoo)
          Returns the value of the CC-Output-Octets AVP, of type Unsigned64.
 void setCreditControlServiceSpecificUnits(long ccssu)
          Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.
 void setCreditControlTime(long cct)
          Sets the value of the CC-Time AVP, of type Unsigned32.
 void setCreditControlTotalOctets(long ccto)
          Sets the value of the CC-Total-Octets AVP, of type Unsigned64.
 void setTariffTimeChange(java.util.Date ttc)
           The Tariff-Time-Change AVP (AVP Code 451) is of type Time.
 
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

setTariffTimeChange

void setTariffTimeChange(java.util.Date ttc)
 The Tariff-Time-Change AVP (AVP Code 451) is of type Time.  It is
   sent from the server to the client and includes the time in seconds
   since January 1, 1900, 00:00 UTC, when the tariff of the service will
   be changed.
 
   The tariff change mechanism is optional for the client and server,
   and it is not used for time-based services defined in section 5.  If
   a client does not support the tariff time change mechanism, it MUST
   treat Tariff-Time-Change AVP in the answer message as an incorrect
   CCA answer.  In this case, the client terminates the credit-control
   session and indicates in the Termination-Cause AVP reason
   DIAMETER_BAD_ANSWER.
 
   Omission of this AVP means that no tariff change is to be reported.
 

Parameters:
ttc -

getTariffTimeChange

java.util.Date getTariffTimeChange()
Return value of Tariff-Time-Change avp of type time. Null return value indicates that this avp has not been set.

Returns:

hasTariffTimeChange

boolean hasTariffTimeChange()
Return true if avp is present

Returns:

setCreditControlMoneyAvp

void setCreditControlMoneyAvp(CcMoneyAvp ccm)
Set value of CC-Money avp of type Grouped.
See: CcMoneyAvp

Parameters:
ccm -

getCreditControlMoneyAvp

CcMoneyAvp getCreditControlMoneyAvp()
Returns value of CC-Money avp of type grouped. Return value of null indicates that this avp has not been set.
See: CcMoneyAvp

Returns:

hasCreditControlMoneyAvp

boolean hasCreditControlMoneyAvp()
Return true if CC-Money avp is present

Returns:

setCreditControlTotalOctets

void setCreditControlTotalOctets(long ccto)
Sets the value of the CC-Total-Octets AVP, of type Unsigned64.

Parameters:
ccto -

getCreditControlTotalOctets

long getCreditControlTotalOctets()
Returns value of the CC-Total-Octets AVP, of type Unsigned64. If not present value should be <0

Returns:

hasCreditControlTotalOctets

boolean hasCreditControlTotalOctets()
Returns true if CC-Total-Octets avp is present

Returns:

setCreditControlInputOctets

void setCreditControlInputOctets(long ttc)
Sets the value of the CC-Input-Octets AVP, of type Unsigned64.

Parameters:
ttc -

getCreditControlInputOctets

long getCreditControlInputOctets()
Returns value of the CC-Input-Octets AVP, of type Unsigned64.

Returns:

hasCreditControlInputOctets

boolean hasCreditControlInputOctets()
Returns true if CC-Input-Octets AVP is present

Returns:

setCreditControlOutputOctets

void setCreditControlOutputOctets(long ccoo)
Returns the value of the CC-Output-Octets AVP, of type Unsigned64.

Parameters:
ccoo -

getCreditControlOutputOctets

long getCreditControlOutputOctets()
Returns the value of the CC-Output-Octets AVP, of type Unsigned64.

Returns:

hasCreditControlOutputOctets

boolean hasCreditControlOutputOctets()
Returns true if CC-Output-Octets AVP is present

Returns:

setCreditControlTime

void setCreditControlTime(long cct)
Sets the value of the CC-Time AVP, of type Unsigned32.

Parameters:
cct -

getCreditControlTime

long getCreditControlTime()
Returns the value of the CC-Time AVP, of type Unsigned32.

Returns:

hasCreditControlTime

boolean hasCreditControlTime()
Returns true if CC-Time AVP is present.

Returns:

setCreditControlServiceSpecificUnits

void setCreditControlServiceSpecificUnits(long ccssu)
Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.

Parameters:
ccssu -

getCreditControlServiceSpecificUnits

long getCreditControlServiceSpecificUnits()
Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64.

Returns:

hasCreditControlServiceSpecificUnits

boolean hasCreditControlServiceSpecificUnits()
Returns true if CC-Servce-Specific-Units AVP is present.

Returns:


Copyright © 2011. All Rights Reserved.