Interface Envelope
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface Envelope extends GroupedAvp
Defines an interface representing the Envelope grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V10.0.0) specification:7.2.59 Envelope AVP The Envelope AVP (AVP code 1266) is a grouped AVP which reports the start and end time of one time envelope using the Envelope-Start-Time and Envelope-End-Time AVPs. Further details of its usage are described in clause 6.5.6 and 6.5.7. If an envelope has not been closed at the time of the usage report, then the Envelope-End-Time AVP shall be absent. If an envelope was started before the reporting interval then the Envelope-Start-Time is nevertheless present and contains the same time as previously reported, i.e. the actual time of the start of the envelope. The client shall include the volume reports (the CC-xxxxx-Octets AVPs) or events (CC-Service-Specific-Units) if these were requested in the corresponding Envelope-Reporting AVP. The reported volume is always the volume from the beginning of the time envelope. In circumstances, in which an envelope is retrospectively deemed to have been closed, e.g. with Quota-Consumption- Time changes in a CCA, then the client shall include the Envelope-AVP for the envelope in the next usage report. Multiple occurrences of this AVP shall be in chronological order, i.e. the first envelope is listed first in CCR. Envelope ::= < AVP Header: 1266> { Envelope-Start-Time } [ Envelope-End-Time ] [ CC-Total-Octets ] [ CC-Input-Octets ] [ CC-Output-Octets ] [ CC-Service-Specific-Units ] * [ AVP ]
-
-
Field Summary
-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getCcInputOctets()
Returns the value of the CC-Input-Octets AVP, of type Unsigned64.long
getCcOutputOctets()
Returns the value of the CC-Output-Octets AVP, of type Unsigned64.long
getCcServiceSpecificUnits()
Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64.long
getCcTotalOctets()
Returns the value of the CC-Total-Octets AVP, of type Unsigned64.Date
getEnvelopeEndTime()
Returns the value of the Envelope-End-Time AVP, of type Time.Date
getEnvelopeStartTime()
Returns the value of the Envelope-Start-Time AVP, of type Time.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.boolean
hasCcInputOctets()
Returns true if the CC-Input-Octets AVP is present in the Envelope AVP.boolean
hasCcOutputOctets()
Returns true if the CC-Output-Octets AVP is present in the Envelope AVP.boolean
hasCcServiceSpecificUnits()
Returns true if the CC-Service-Specific-Units AVP is present in the Envelope AVP.boolean
hasCcTotalOctets()
Returns true if the CC-Total-Octets AVP is present in the Envelope AVP.boolean
hasEnvelopeEndTime()
Returns true if the Envelope-End-Time AVP is present in the Envelope AVP.boolean
hasEnvelopeStartTime()
Returns true if the Envelope-Start-Time AVP is present in the Envelope AVP.void
removeCcInputOctets()
Removes the CC-Input-Octets AVP from the Envelope AVP.void
removeCcOutputOctets()
Removes the CC-Output-Octets AVP from the Envelope AVP.void
removeCcServiceSpecificUnits()
Removes the CC-Service-Specific-Units AVP from the Envelope AVP.void
removeCcTotalOctets()
Removes the CC-Total-Octets AVP from the Envelope AVP.void
removeEnvelopeEndTime()
Removes the Envelope-End-Time AVP from the Envelope AVP.void
removeEnvelopeStartTime()
Removes the Envelope-Start-Time AVP from the Envelope AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Envelope AVP.void
setCcInputOctets(long ccInputOctets)
Sets the value of the CC-Input-Octets AVP, of type Unsigned64.void
setCcOutputOctets(long ccOutputOctets)
Sets the value of the CC-Output-Octets AVP, of type Unsigned64.void
setCcServiceSpecificUnits(long ccServiceSpecificUnits)
Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.void
setCcTotalOctets(long ccTotalOctets)
Sets the value of the CC-Total-Octets AVP, of type Unsigned64.void
setEnvelopeEndTime(Date envelopeEndTime)
Sets the value of the Envelope-End-Time AVP, of type Time.void
setEnvelopeStartTime(Date envelopeStartTime)
Sets the value of the Envelope-Start-Time AVP, of type Time.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
Method Detail
-
hasEnvelopeStartTime
boolean hasEnvelopeStartTime()
Returns true if the Envelope-Start-Time AVP is present in the Envelope AVP.
-
getEnvelopeStartTime
Date getEnvelopeStartTime()
Returns the value of the Envelope-Start-Time AVP, of type Time.- Returns:
- the value of the Envelope-Start-Time AVP, or null if it has not been set.
-
setEnvelopeStartTime
void setEnvelopeStartTime(Date envelopeStartTime)
Sets the value of the Envelope-Start-Time AVP, of type Time.- Throws:
NullPointerException
- ifenvelopeStartTime
isnull
.
-
removeEnvelopeStartTime
void removeEnvelopeStartTime()
Removes the Envelope-Start-Time AVP from the Envelope AVP. If the Envelope-Start-Time AVP is not present, this method returns silently.
-
hasEnvelopeEndTime
boolean hasEnvelopeEndTime()
Returns true if the Envelope-End-Time AVP is present in the Envelope AVP.
-
getEnvelopeEndTime
Date getEnvelopeEndTime()
Returns the value of the Envelope-End-Time AVP, of type Time.- Returns:
- the value of the Envelope-End-Time AVP, or null if it has not been set.
-
setEnvelopeEndTime
void setEnvelopeEndTime(Date envelopeEndTime)
Sets the value of the Envelope-End-Time AVP, of type Time.- Throws:
NullPointerException
- ifenvelopeEndTime
isnull
.
-
removeEnvelopeEndTime
void removeEnvelopeEndTime()
Removes the Envelope-End-Time AVP from the Envelope AVP. If the Envelope-End-Time AVP is not present, this method returns silently.
-
hasCcTotalOctets
boolean hasCcTotalOctets()
Returns true if the CC-Total-Octets AVP is present in the Envelope AVP.
-
getCcTotalOctets
long getCcTotalOctets()
Returns the value of the CC-Total-Octets AVP, of type Unsigned64. UsehasCcTotalOctets()
to check the existence of this AVP.- Returns:
- the value of the CC-Total-Octets AVP
- Throws:
IllegalStateException
- if the CC-Total-Octets AVP has not been set.
-
setCcTotalOctets
void setCcTotalOctets(long ccTotalOctets)
Sets the value of the CC-Total-Octets AVP, of type Unsigned64.
-
removeCcTotalOctets
void removeCcTotalOctets()
Removes the CC-Total-Octets AVP from the Envelope AVP. If the CC-Total-Octets AVP is not present, this method returns silently.
-
hasCcInputOctets
boolean hasCcInputOctets()
Returns true if the CC-Input-Octets AVP is present in the Envelope AVP.
-
getCcInputOctets
long getCcInputOctets()
Returns the value of the CC-Input-Octets AVP, of type Unsigned64. UsehasCcInputOctets()
to check the existence of this AVP.- Returns:
- the value of the CC-Input-Octets AVP
- Throws:
IllegalStateException
- if the CC-Input-Octets AVP has not been set.
-
setCcInputOctets
void setCcInputOctets(long ccInputOctets)
Sets the value of the CC-Input-Octets AVP, of type Unsigned64.
-
removeCcInputOctets
void removeCcInputOctets()
Removes the CC-Input-Octets AVP from the Envelope AVP. If the CC-Input-Octets AVP is not present, this method returns silently.
-
hasCcOutputOctets
boolean hasCcOutputOctets()
Returns true if the CC-Output-Octets AVP is present in the Envelope AVP.
-
getCcOutputOctets
long getCcOutputOctets()
Returns the value of the CC-Output-Octets AVP, of type Unsigned64. UsehasCcOutputOctets()
to check the existence of this AVP.- Returns:
- the value of the CC-Output-Octets AVP
- Throws:
IllegalStateException
- if the CC-Output-Octets AVP has not been set.
-
setCcOutputOctets
void setCcOutputOctets(long ccOutputOctets)
Sets the value of the CC-Output-Octets AVP, of type Unsigned64.
-
removeCcOutputOctets
void removeCcOutputOctets()
Removes the CC-Output-Octets AVP from the Envelope AVP. If the CC-Output-Octets AVP is not present, this method returns silently.
-
hasCcServiceSpecificUnits
boolean hasCcServiceSpecificUnits()
Returns true if the CC-Service-Specific-Units AVP is present in the Envelope AVP.
-
getCcServiceSpecificUnits
long getCcServiceSpecificUnits()
Returns the value of the CC-Service-Specific-Units AVP, of type Unsigned64. UsehasCcServiceSpecificUnits()
to check the existence of this AVP.- Returns:
- the value of the CC-Service-Specific-Units AVP
- Throws:
IllegalStateException
- if the CC-Service-Specific-Units AVP has not been set.
-
setCcServiceSpecificUnits
void setCcServiceSpecificUnits(long ccServiceSpecificUnits)
Sets the value of the CC-Service-Specific-Units AVP, of type Unsigned64.
-
removeCcServiceSpecificUnits
void removeCcServiceSpecificUnits()
Removes the CC-Service-Specific-Units AVP from the Envelope AVP. If the CC-Service-Specific-Units AVP is not present, this method returns silently.
-
getExtensionAvps
DiameterAvp[] getExtensionAvps()
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Envelope AVP. A return value of null implies that no extensions AVPs have been set.
-
setExtensionAvps
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Envelope AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)NullPointerException
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Envelope AVP. If no extension AVPs are present, this method returns silently.
-
-