com.ibm.diameter.charging.util
Class MessageClass

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

public class MessageClass
extends java.lang.Object

MessageClass is a lightweight representation of the Grouped [Message-Class] Avp. It identifies the class of an MM message.

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


Constructor Summary
MessageClass()
          Constructs an empty MessageClass object representing the [Message-Class] Avp.
MessageClass(java.util.List<Avp> avps)
          Constructs a MessageClass object representing the Grouped [Message-Class] Avp.
 
Method Summary
 java.lang.Integer getClassIdentifier()
          Gets the value corresponding to the payload of the [Class-Identifier] Avp.
 java.lang.String getTokenText()
          Gets the value corresponding to the payload of the [Token-Text] Avp.
 void setClassIdentifier(java.lang.Integer classIdentifier)
          Sets the value corresponding to the payload of the [Class-Identifier] Avp.
 void setTokenText(java.lang.String tokenText)
          Sets the value corresponding to the payload of the [Token-Text] Avp.
 Avp toAvp()
          Transforms a MessageClass object into a Grouped [Message-Class] Avp.
 void validate()
          Validates the members of the MessageClass object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageClass

public MessageClass()
Constructs an empty MessageClass object representing the [Message-Class] Avp.


MessageClass

public MessageClass(java.util.List<Avp> avps)
             throws AvpTransformationException
Constructs a MessageClass object representing the Grouped [Message-Class] Avp.

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

getClassIdentifier

public java.lang.Integer getClassIdentifier()
Gets the value corresponding to the payload of the [Class-Identifier] Avp.

Returns:
the value corresponding to the payload of the [Class-Identifier] Avp.

setClassIdentifier

public void setClassIdentifier(java.lang.Integer classIdentifier)
Sets the value corresponding to the payload of the [Class-Identifier] Avp.

Parameters:
classIdentifier - the value corresponding to the payload of the [Class-Identifier] Avp.

getTokenText

public java.lang.String getTokenText()
Gets the value corresponding to the payload of the [Token-Text] Avp.

Returns:
the value corresponding to the payload of the [Token-Text] Avp.

setTokenText

public void setTokenText(java.lang.String tokenText)
Sets the value corresponding to the payload of the [Token-Text] Avp.

Parameters:
tokenText - the value corresponding to the payload of the [Token-Text] Avp.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a MessageClass object into a Grouped [Message-Class] Avp.

All non-null members of MessageClass will be transformed into Avps nested inside of the [Message-Class] Avp.

Returns:
the [Message-Class] Avp.
Throws:
AvpTransformationException - if a member of MessageClass is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.