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 candecode
the AVP if they know the correct AVP type, i.e. one of theDiameterAvpType
constant field values.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
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 AVPDiameterAvp
decode(DiameterAvpType type, String name)
Attempt to decode this undefined AVP to an AVP of a known type.DiameterAvpType
getType()
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
DiameterAvp
object of the given type. The originalUndefinedAvp
object 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
UndefinedAvp
data is available as a byte array. To convert the data to a known type, usedecode(DiameterAvpType,String)
.- Specified by:
byteArrayValue
in interfaceDiameterAvp
- Returns:
- the AVP value as a byte array
-
getType
DiameterAvpType getType()
Return the AVP type (one of the String constants fromDiameterAvpType
..UndefinedAvp
objects will always return a type ofDiameterAvpType.UNDEFINED
.- Specified by:
getType
in interfaceDiameterAvp
- Returns:
- the AVP type
-
-