Interface EventType
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface EventType extends GroupedAvp
Defines an interface representing the Event-Type grouped AVP type. From the Diameter Ro Reference Point Protocol Details (3GPP TS 32.299 V9.6.0) specification:7.2.65 Event-Type AVP The Event-Type AVP (AVP code 823) is of type Grouped and contains information about the type of chargeable telecommunication service/event for which the accounting-request message is generated. It has the following ABNF grammar: Event-Type ::= <AVP Header: 823 > [ SIP-Method ] [ Event ] [ Expires ]
Note:
The support for extension AVPs is present even thou the ABNF grammar for this AVP does not contain the "* [ AVP ]" line. Be aware that adding any extension AVPs may result in interoperability problems with products that strongly validate the incoming diameter message for it's adherence to the specification.
-
-
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 String
getEvent()
Returns the value of the Event AVP, of type UTF8String.long
getExpires()
Returns the value of the Expires AVP, of type Unsigned32.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.String
getSipMethod()
Returns the value of the SIP-Method AVP, of type UTF8String.boolean
hasEvent()
Returns true if the Event AVP is present in the Event-Type AVP.boolean
hasExpires()
Returns true if the Expires AVP is present in the Event-Type AVP.boolean
hasSipMethod()
Returns true if the SIP-Method AVP is present in the Event-Type AVP.void
removeEvent()
Removes the Event AVP from the Event-Type AVP.void
removeExpires()
Removes the Expires AVP from the Event-Type AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Event-Type AVP.void
removeSipMethod()
Removes the SIP-Method AVP from the Event-Type AVP.void
setEvent(String event)
Sets the value of the Event AVP, of type UTF8String.void
setExpires(long expires)
Sets the value of the Expires AVP, of type Unsigned32.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setSipMethod(String sipMethod)
Sets the value of the SIP-Method AVP, of type UTF8String.-
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
-
hasSipMethod
boolean hasSipMethod()
Returns true if the SIP-Method AVP is present in the Event-Type AVP.
-
getSipMethod
String getSipMethod()
Returns the value of the SIP-Method AVP, of type UTF8String.- Returns:
- the value of the SIP-Method AVP, or null if it has not been set.
-
setSipMethod
void setSipMethod(String sipMethod)
Sets the value of the SIP-Method AVP, of type UTF8String.- Throws:
NullPointerException
- ifsipMethod
isnull
.
-
removeSipMethod
void removeSipMethod()
Removes the SIP-Method AVP from the Event-Type AVP. If the SIP-Method AVP is not present, this method returns silently.
-
hasEvent
boolean hasEvent()
Returns true if the Event AVP is present in the Event-Type AVP.
-
getEvent
String getEvent()
Returns the value of the Event AVP, of type UTF8String.- Returns:
- the value of the Event AVP, or null if it has not been set.
-
setEvent
void setEvent(String event)
Sets the value of the Event AVP, of type UTF8String.- Throws:
NullPointerException
- ifevent
isnull
.
-
removeEvent
void removeEvent()
Removes the Event AVP from the Event-Type AVP. If the Event AVP is not present, this method returns silently.
-
hasExpires
boolean hasExpires()
Returns true if the Expires AVP is present in the Event-Type AVP.
-
getExpires
long getExpires()
Returns the value of the Expires AVP, of type Unsigned32. UsehasExpires()
to check the existence of this AVP.- Returns:
- the value of the Expires AVP
- Throws:
IllegalStateException
- if the Expires AVP has not been set.
-
setExpires
void setExpires(long expires)
Sets the value of the Expires AVP, of type Unsigned32.
-
removeExpires
void removeExpires()
Removes the Expires AVP from the Event-Type AVP. If the Expires 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 Event-Type 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 Event-Type 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 Event-Type AVP. If no extension AVPs are present, this method returns silently.
-
-