com.ibm.diameter.charging.util
Class OriginatorAddress

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

public class OriginatorAddress
extends java.lang.Object

OriginatorAddress is a lightweight representation of the Grouped [Originator-Address] Avp. It identifies the originating address of a MM.

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


Constructor Summary
OriginatorAddress()
          Constructs an empty OriginatorAddress object representing the [Originator-Address] Avp.
OriginatorAddress(java.util.List<Avp> avps)
          Constructs an OriginatorAddress object representing the Grouped [Originator-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 [Originator-Address] 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 [Originator-Address] Avp.
 void setAddressType(java.lang.Integer addressType)
          Sets the value corresponding to the payload of the [Address-Type] Avp.
 Avp toAvp()
          Transforms an OriginatorAddress object into a Grouped [Originator-Address] Avp.
 void validate()
          Validates the members of the OriginatorAddress object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriginatorAddress

public OriginatorAddress()
Constructs an empty OriginatorAddress object representing the [Originator-Address] Avp.


OriginatorAddress

public OriginatorAddress(java.util.List<Avp> avps)
                  throws AvpTransformationException
Constructs an OriginatorAddress object representing the Grouped [Originator-Address] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of OriginatorAddress, 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 [Originator-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 [Originator-Address] Avp.

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

setAddressDomain

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

Parameters:
addressDomain - the value corresponding to the payload of the [Originator-Address] 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.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms an OriginatorAddress object into a Grouped [Originator-Address] Avp.

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

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


Copyright © 2006 IBM Corp. All Rights Reserved.