com.ibm.diameter.packet
Class AvpDefinition

java.lang.Object
  extended by com.ibm.diameter.packet.AvpDefinition
Direct Known Subclasses:
VsAvpDefinition

public class AvpDefinition
extends java.lang.Object

The AvpDefinition contains information about a specific AVP, including the name of the attribute, the IANA defined AVP code associated with the attribute and the AVP Data Format associated with the attribute. It also contains an AvpValueUtil object that contains the value of this attribute and that knows how to read and write this data type. Finally, it contains an AvpValidatorUtil object that knows how to validate this data type.


Field Summary
static int AVP_TYPE_ADDRESS
           
static int AVP_TYPE_DIAM_IDENT
           
static int AVP_TYPE_DIAM_URI
           
static int AVP_TYPE_ENUMERATED
           
static int AVP_TYPE_GROUPED
           
static int AVP_TYPE_INTEGER32
           
static int AVP_TYPE_INTEGER64
           
static int AVP_TYPE_IP_FILTER_RULE
           
static int AVP_TYPE_OCTET_STRING
           
static int AVP_TYPE_QOS_FILTER_RULE
           
static int AVP_TYPE_TIME
           
static int AVP_TYPE_UNSIGNED32
           
static int AVP_TYPE_UNSIGNED64
           
static int AVP_TYPE_UTF8_STRING
           
 
Constructor Summary
AvpDefinition(int avpCode, java.lang.String avpName, int avpType, AvpValueUtil avpValueUtil, AvpValidatorUtil avpValidatorUtil, AvpABNF avpABNF, boolean vBit, boolean mBit, boolean pBit)
          Creates an AVP definition that explains the format of the AVP.
AvpDefinition(int avpCode, java.lang.String avpName, int avpType, AvpValueUtil avpValueUtil, AvpValidatorUtil avpValidatorUtil, boolean vBit, boolean mBit, boolean pBit)
          Creates an AVP definition that explains the format of the AVP.
 
Method Summary
 AvpABNF getAvpABNF()
          Returns the instance of AvpABNF that defines the format of this grouped Avp.
 int getAvpCode()
          Returns the AVP Code.
 java.lang.String getAvpName()
          Returns the AVP name
 int getAvpType()
          Returns the AVP Data Format
 AvpValidatorUtil getAvpValidatorUtil()
          Returns the instance of AvpValidatorUtil that knows how to validate an AVP of this type.
 AvpValueUtil getAvpValueUtil()
          Returns an instance of a specific AvpValueUtil class that knows how to read the value of the AVP.
 boolean isMandatoryFlag()
          Queries whether the Mandatory bit is required for this AVP definition.
 boolean isPBit()
          Queries whether the P bit is set for this AVP definition
 boolean isVBit()
          Queries whether the Vendor-Specific bit is required for this AVP definition
 void setAvpValidatorUtil(AvpValidatorUtil avpValidatorUtil)
          Sets the instance of AvpValidatorUtil
 void setMandatoryFlag(boolean mandatoryFlag)
          Determines whether the Mandatory bit is required for this AVP definition.
 void setPBit(boolean bit)
          Sets the P bit for this AVP definition.
 void setVBit(boolean bit)
          Sets the Vendor-Specific bit on this AVP definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVP_TYPE_OCTET_STRING

public static final int AVP_TYPE_OCTET_STRING
See Also:
Constant Field Values

AVP_TYPE_INTEGER32

public static final int AVP_TYPE_INTEGER32
See Also:
Constant Field Values

AVP_TYPE_INTEGER64

public static final int AVP_TYPE_INTEGER64
See Also:
Constant Field Values

AVP_TYPE_UNSIGNED32

public static final int AVP_TYPE_UNSIGNED32
See Also:
Constant Field Values

AVP_TYPE_UNSIGNED64

public static final int AVP_TYPE_UNSIGNED64
See Also:
Constant Field Values

AVP_TYPE_GROUPED

public static final int AVP_TYPE_GROUPED
See Also:
Constant Field Values

AVP_TYPE_ADDRESS

public static final int AVP_TYPE_ADDRESS
See Also:
Constant Field Values

AVP_TYPE_TIME

public static final int AVP_TYPE_TIME
See Also:
Constant Field Values

AVP_TYPE_UTF8_STRING

public static final int AVP_TYPE_UTF8_STRING
See Also:
Constant Field Values

AVP_TYPE_DIAM_IDENT

public static final int AVP_TYPE_DIAM_IDENT
See Also:
Constant Field Values

AVP_TYPE_DIAM_URI

public static final int AVP_TYPE_DIAM_URI
See Also:
Constant Field Values

AVP_TYPE_ENUMERATED

public static final int AVP_TYPE_ENUMERATED
See Also:
Constant Field Values

AVP_TYPE_IP_FILTER_RULE

public static final int AVP_TYPE_IP_FILTER_RULE
See Also:
Constant Field Values

AVP_TYPE_QOS_FILTER_RULE

public static final int AVP_TYPE_QOS_FILTER_RULE
See Also:
Constant Field Values
Constructor Detail

AvpDefinition

public AvpDefinition(int avpCode,
                     java.lang.String avpName,
                     int avpType,
                     AvpValueUtil avpValueUtil,
                     AvpValidatorUtil avpValidatorUtil,
                     boolean vBit,
                     boolean mBit,
                     boolean pBit)
Creates an AVP definition that explains the format of the AVP.

Parameters:
avpCode - The IANA defined code for this Diameter Attribute.
avpName - The Attribute Name
avpType - The AVP Data Format
avpValueUtil - The utility class that knows how to read and write an attribute of this data format
avpValidatorUtil - The utility class that knows how to validate an attribute of this data format
vBit - If true, this AVP is a vendor specific AVP
mBit - If true, this AVP is mandatory and must be understood by both peers exchanging this message
pBit - This bit should always be zero. It is an obsolete security bit.

AvpDefinition

public AvpDefinition(int avpCode,
                     java.lang.String avpName,
                     int avpType,
                     AvpValueUtil avpValueUtil,
                     AvpValidatorUtil avpValidatorUtil,
                     AvpABNF avpABNF,
                     boolean vBit,
                     boolean mBit,
                     boolean pBit)
Creates an AVP definition that explains the format of the AVP.

Parameters:
avpCode - The IANA defined code for this Diameter Attribute.
avpName - The Attribute Name
avpType - The AVP Data Format
avpValueUtil - The utility class that knows how to read and write an attribute of this data format
avpValidatorUtil - The utility class that knows how to validate an attribute of this data format
avpABNF - The ABNF of a grouped AVP that defines the rules of occurence of the group's AVPs.
vBit - If true, this AVP is a vendor specific AVP
mBit - If true, this AVP is mandatory and must be understood by both peers exchanging this message
pBit - This bit should always be zero. It is an obsolete security bit.
Method Detail

getAvpValueUtil

public AvpValueUtil getAvpValueUtil()
Returns an instance of a specific AvpValueUtil class that knows how to read the value of the AVP. The instance returned has been created using the default constructor.

Returns:
Returns the avpValueUtil extension matching the AVP in this definition.

getAvpCode

public int getAvpCode()
Returns the AVP Code.

Returns:
The IANA defined code for this Diameter Attribute.

getAvpName

public java.lang.String getAvpName()
Returns the AVP name

Returns:
The name of this attribute

getAvpType

public int getAvpType()
Returns the AVP Data Format

Returns:
Returns the AVP Data Format

getAvpValidatorUtil

public AvpValidatorUtil getAvpValidatorUtil()
Returns the instance of AvpValidatorUtil that knows how to validate an AVP of this type.

Returns:
the avpValidatorUtil

setAvpValidatorUtil

public void setAvpValidatorUtil(AvpValidatorUtil avpValidatorUtil)
Sets the instance of AvpValidatorUtil

Parameters:
avpValidatorUtil - The instance of avpValidatorUtil that knows how to validate an AVP of this type.

isMandatoryFlag

public boolean isMandatoryFlag()
Queries whether the Mandatory bit is required for this AVP definition.

Returns:
true if the Mandatory bit is required, otherwise false.

setMandatoryFlag

public void setMandatoryFlag(boolean mandatoryFlag)
Determines whether the Mandatory bit is required for this AVP definition.

Parameters:
mandatoryFlag - true if support for this AVP is required, otherwise false.

isPBit

public boolean isPBit()
Queries whether the P bit is set for this AVP definition

Returns:
true if the P bit is set, otherwise false.

setPBit

public void setPBit(boolean bit)
Sets the P bit for this AVP definition. Note, this bit should always be zero.

Parameters:
bit - true if this AVP definition requires encryption for end-to-end security, otherwise false.

isVBit

public boolean isVBit()
Queries whether the Vendor-Specific bit is required for this AVP definition

Returns:
true if the Vendor-Specific bit is required, otherwise false.

setVBit

public void setVBit(boolean bit)
Sets the Vendor-Specific bit on this AVP definition

Parameters:
bit - true if this is a Vendor-Specific AVP, otherwise false.

getAvpABNF

public AvpABNF getAvpABNF()
Returns the instance of AvpABNF that defines the format of this grouped Avp.

Returns:
AvpABNF that defines the format of a grouped Avp.


Copyright © 2006 IBM Corp. All Rights Reserved.