com.ibm.diameter.charging.util
Class RecipientAddress

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

public class RecipientAddress
extends java.lang.Object

RecipientAddress is a lightweight representation of the Grouped [Recipient-Address] Avp. It identifies the recipient of a MM.

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


Constructor Summary
RecipientAddress()
          Constructs an empty RecipientAddress object representing the [Recipient-Address] Avp.
RecipientAddress(java.util.List<Avp> avps)
          Constructs a RecipientAddress object representing the Grouped [Recipient-Address] Avp.
 
Method Summary
 java.lang.String getAddressData()
          Gets the value corresponding to the payload of the [Address-Data] Avp.
 AddressDomain getAddressDomain()
          Gets the value corresponding to the payload of the [Address-Domain] Avp.
 java.lang.Integer getAddresseeType()
          Gets the value corresponding to the payload of the [Addressee-Type] Avp.
 java.lang.Integer getAddressType()
          Gets the value corresponding to the payload of the [Address-Type] Avp.
 void setAddressData(java.lang.String addressData)
          Sets the value corresponding to the payload of the [Address-Data] Avp.
 void setAddressDomain(AddressDomain addressDomain)
          Sets the value corresponding to the payload of the [Address-Domain] Avp.
 void setAddresseeType(java.lang.Integer addresseeType)
          Sets the value corresponding to the payload of the [Addressee-Type] Avp.
 void setAddressType(java.lang.Integer addressType)
          Sets the value corresponding to the payload of the [Address-Type] Avp.
 Avp toAvp()
          Transforms a RecipientAddress object into a Grouped [Recipient-Address] Avp.
 void validate()
          Validates the members of the RecipientAddress object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecipientAddress

public RecipientAddress()
Constructs an empty RecipientAddress object representing the [Recipient-Address] Avp.


RecipientAddress

public RecipientAddress(java.util.List<Avp> avps)
                 throws AvpTransformationException
Constructs a RecipientAddress object representing the Grouped [Recipient-Address] Avp.

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

getAddressData

public java.lang.String getAddressData()
Gets the value corresponding to the payload of the [Address-Data] Avp.

Returns:
the value corresponding to the payload of the [Address-Data] Avp.

setAddressData

public void setAddressData(java.lang.String addressData)
Sets the value corresponding to the payload of the [Address-Data] Avp.

Parameters:
addressData - the value corresponding to the payload of the [Address-Data] Avp.

getAddressDomain

public AddressDomain getAddressDomain()
Gets the value corresponding to the payload of the [Address-Domain] Avp.

Returns:
the value corresponding to the payload of the [Address-Domain] Avp.

setAddressDomain

public void setAddressDomain(AddressDomain addressDomain)
Sets the value corresponding to the payload of the [Address-Domain] Avp.

Parameters:
addressDomain - the value corresponding to the payload of the [Address-Domain] Avp.

getAddressType

public java.lang.Integer getAddressType()
Gets the value corresponding to the payload of the [Address-Type] Avp.

Returns:
the value corresponding to the payload of the [Address-Type] Avp.

setAddressType

public void setAddressType(java.lang.Integer addressType)
Sets the value corresponding to the payload of the [Address-Type] Avp.

Parameters:
addressType - the value corresponding to the payload of the [Address-Type] Avp.

getAddresseeType

public java.lang.Integer getAddresseeType()
Gets the value corresponding to the payload of the [Addressee-Type] Avp.

Returns:
the value corresponding to the payload of the [Addressee-Type] Avp.

setAddresseeType

public void setAddresseeType(java.lang.Integer addresseeType)
Sets the value corresponding to the payload of the [Addressee-Type] Avp.

Parameters:
addresseeType - the value corresponding to the payload of the [Addressee-Type] Avp.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a RecipientAddress object into a Grouped [Recipient-Address] Avp.

All non-null members of RecipientAddress will be transformed into Avps nested inside of the [Recipient-Address] Avp.

Returns:
the [Recipient-Address] Avp.
Throws:
AvpTransformationException - if a member of RecipientAddress is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.