Interface UndefinedAvp
-
- All Superinterfaces:
Cloneable,DiameterAvp
public interface UndefinedAvp extends DiameterAvp
Represents an AVP that was not recognised by the stack. This means the AVP's code was not registered, so the stack does not know the AVP's type and how to decode it. Applications candecodethe AVP if they know the correct AVP type, i.e. one of theDiameterAvpTypeconstant field values.
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]byteArrayValue()Return the raw contents of this AVPDiameterAvpdecode(DiameterAvpType type, String name)Attempt to decode this undefined AVP to an AVP of a known type.DiameterAvpTypegetType()Return the AVP type (one of the String constants fromDiameterAvpType.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
Field Detail
-
NAME
static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
decode
DiameterAvp decode(DiameterAvpType type, String name) throws DecodeException
Attempt to decode this undefined AVP to an AVP of a known type.- Parameters:
type- the desired type for the decoded AVP. This must be one of the constant values inDiameterAvpType.name- the name of the new AVP. Only used for debugging purposes.- Returns:
- a new
DiameterAvpobject of the given type. The originalUndefinedAvpobject is unchanged. - Throws:
DecodeException- if unable to decode this AVP's data as the desired type.
-
byteArrayValue
byte[] byteArrayValue()
Return the raw contents of this AVP.The
UndefinedAvpdata is available as a byte array. To convert the data to a known type, usedecode(DiameterAvpType,String).- Specified by:
byteArrayValuein interfaceDiameterAvp- Returns:
- the AVP value as a byte array
-
getType
DiameterAvpType getType()
Return the AVP type (one of the String constants fromDiameterAvpType..UndefinedAvpobjects will always return a type ofDiameterAvpType.UNDEFINED.- Specified by:
getTypein interfaceDiameterAvp- Returns:
- the AVP type
-
-