com.ibm.diameter.charging.util
Class UserEquipmentInfo

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

public class UserEquipmentInfo
extends java.lang.Object

UserEquipmentInfo is a lightweight representation of the Grouped [User-Equipment-Info] Avp. It contains the identity and capability of the terminal a subscriber is using to connect to the network.

The [User-Equipment-Info] Avp is defined in RFC 4006 - Diameter Credit-Control Application.


Constructor Summary
UserEquipmentInfo()
          Constructs an empty UserEquipmentInfo object representing the [User-Equipment-Info] Avp.
UserEquipmentInfo(java.util.List<Avp> avps)
          Constructs a UserEquipmentInfo object representing the Grouped [User-Equipment-Info] Avp.
 
Method Summary
 java.lang.Integer getUserEquipmentInfoType()
          Gets the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.
 byte[] getUserEquipmentInfoValue()
          Gets the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.
 void setUserEquipmentInfoType(java.lang.Integer userEquipmentInfoType)
          Sets the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.
 void setUserEquipmentInfoValue(byte[] userEquipmentInfoValue)
          Sets the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.
 Avp toAvp()
          Transforms a UserEquipmentInfo object into a Grouped [User-Equipment-Info] Avp.
 void validate()
          Validates the members of the UserEquipmentInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserEquipmentInfo

public UserEquipmentInfo()
Constructs an empty UserEquipmentInfo object representing the [User-Equipment-Info] Avp.


UserEquipmentInfo

public UserEquipmentInfo(java.util.List<Avp> avps)
                  throws AvpTransformationException
Constructs a UserEquipmentInfo object representing the Grouped [User-Equipment-Info] Avp.

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

getUserEquipmentInfoType

public java.lang.Integer getUserEquipmentInfoType()
Gets the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.

Returns:
the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.

setUserEquipmentInfoType

public void setUserEquipmentInfoType(java.lang.Integer userEquipmentInfoType)
Sets the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.

Parameters:
userEquipmentInfoType - the value corresponding to the payload of the {User-Equipment-Info-Type} Avp.

getUserEquipmentInfoValue

public byte[] getUserEquipmentInfoValue()
Gets the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.

Returns:
the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.

setUserEquipmentInfoValue

public void setUserEquipmentInfoValue(byte[] userEquipmentInfoValue)
Sets the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.

Parameters:
userEquipmentInfoValue - the value corresponding to the payload of the {User-Equipment-Info-Value} Avp.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a UserEquipmentInfo object into a Grouped [User-Equipment-Info] Avp.

All non-null members of UserEquipmentInfo will be transformed into Avps nested inside of the [User-Equipment-Info] Avp.

Returns:
the [User-Equipment-Info] Avp.
Throws:
AvpTransformationException - if a member of UserEquipmentInfo is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.