com.ibm.diameter.charging.util
Class EventType

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

public class EventType
extends java.lang.Object

EventType is a lightweight representation of the Grouped [Event-Type] Avp. It contains the type of SIP event for which accounting or charging is being performed.

The [Event-Type] Avp is defined by the 3GPP in ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications.


Constructor Summary
EventType()
          Constructs an empty EventType object representing the [Event-Type] Avp.
EventType(java.util.List<Avp> avps)
          Constructs an EventType object representing the Grouped [Event-Type] Avp.
 
Method Summary
 java.lang.String getEvent()
          Gets the value corresponding to the payload of the [Event] Avp.
 java.lang.Integer getExpires()
          Gets the value corresponding to the payload of the [Expires] Avp.
 java.lang.String getSipMethod()
          Gets the value corresponding to the payload of the [SIP-Method] Avp.
 void setEvent(java.lang.String event)
          Sets the value corresponding to the payload of the [Event] Avp.
 void setExpires(java.lang.Integer expires)
          Sets the value corresponding to the payload of the [Expires] Avp.
 void setSipMethod(java.lang.String sipMethod)
          Sets the value corresponding to the payload of the [SIP-Method] Avp.
 Avp toAvp()
          Transforms an EventType object into a Grouped [Event-Type] Avp.
 void validate()
          Validates the members of the EventType object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventType

public EventType()
Constructs an empty EventType object representing the [Event-Type] Avp.


EventType

public EventType(java.util.List<Avp> avps)
          throws AvpTransformationException
Constructs an EventType object representing the Grouped [Event-Type] Avp.

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

getEvent

public java.lang.String getEvent()
Gets the value corresponding to the payload of the [Event] Avp.

Returns:
the value corresponding to the payload of the [Event] Avp.

setEvent

public void setEvent(java.lang.String event)
Sets the value corresponding to the payload of the [Event] Avp.

Parameters:
event - the value corresponding to the payload of the [Event] Avp.

getExpires

public java.lang.Integer getExpires()
Gets the value corresponding to the payload of the [Expires] Avp.

Returns:
the value corresponding to the payload of the [Expires] Avp.

setExpires

public void setExpires(java.lang.Integer expires)
Sets the value corresponding to the payload of the [Expires] Avp.

Parameters:
expires - the value corresponding to the payload of the [Expires] Avp.

getSipMethod

public java.lang.String getSipMethod()
Gets the value corresponding to the payload of the [SIP-Method] Avp.

Returns:
the value corresponding to the payload of the [SIP-Method] Avp.

setSipMethod

public void setSipMethod(java.lang.String sipMethod)
Sets the value corresponding to the payload of the [SIP-Method] Avp.

Parameters:
sipMethod - the value corresponding to the payload of the [SIP-Method] Avp.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms an EventType object into a Grouped [Event-Type] Avp.

All non-null members of EventType will be transformed into Avps nested inside of the [Event-Type] Avp.

Returns:
the [Event-Type] Avp.
Throws:
AvpTransformationException - if a member of EventType is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.