net.java.slee.resource.diameter.base.events.avp
Interface DiameterAvp

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
DiameterIdentityAvp, ExperimentalResultAvp, ExtensionGroupedAvp, FailedAvp, GroupedAvp, ProxyInfoAvp, VendorSpecificApplicationIdAvp
All Known Implementing Classes:
DiameterAvpImpl, DiameterIdentityAvpImpl, ExperimentalResultAvpImpl, FailedAvpImpl, GroupedAvpImpl, IPFilterRuleAvpImpl, ProxyInfoAvpImpl, VendorSpecificApplicationIdAvpImpl

public interface DiameterAvp
extends java.lang.Cloneable

Diameter Attribute Value Pair (AVP). Applications can use this interface to retrieve the AVP's code, name, type and value. Concrete implementations of this interface are created via the DiameterMessageFactory.

Author:
Open Cloud

Field Summary
static int FLAG_RULE_MAY
           
static int FLAG_RULE_MUST
           
static int FLAG_RULE_MUSTNOT
           
 
Method Summary
 byte[] byteArrayValue()
          Return the raw contents of this AVP
 java.lang.Object clone()
          Creates and returns a deep copy of this AVP instance.
 double doubleValue()
          The value of this AVP if the Diameter type can be represented in a Java double value (e.g., Float64, Float32)
 float floatValue()
          The value of this AVP if the Diameter type can be represented in a Java float value (e.g., Float32)
 int getCode()
          Return the AVP code, e.g., 263 for Session-Id
 int getMandatoryRule()
          Return the rule for the mandatory (M) flag of this AVP.
 java.lang.String getName()
          Return the AVP name, e.g., "Session-Id"
 int getProtectedRule()
          Return the rule for the protected (P) flag of this AVP.
 DiameterAvpType getType()
          Return the AVP type (one of the String constants from org.mobicents.slee.resource.diameter.base.DiameterAvpType.
 long getVendorId()
          Return the Vendor-ID value for proprietary (non-IETF) AVPs.
 int intValue()
          The value of this AVP if the Diameter type can be represented in a Java int value (e.g., Integer32)
 long longValue()
          The value of this AVP if the Diameter type can be represented in a Java long value (e.g., Integer64, Unsigned32, Integer32)
 java.lang.String stringValue()
          The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)
 

Field Detail

FLAG_RULE_MUST

static final int FLAG_RULE_MUST
See Also:
Constant Field Values

FLAG_RULE_MAY

static final int FLAG_RULE_MAY
See Also:
Constant Field Values

FLAG_RULE_MUSTNOT

static final int FLAG_RULE_MUSTNOT
See Also:
Constant Field Values
Method Detail

getCode

int getCode()
Return the AVP code, e.g., 263 for Session-Id

Returns:
the AVP code

getVendorId

long getVendorId()
Return the Vendor-ID value for proprietary (non-IETF) AVPs.

The value should be the IANA-assigned "SMI Network Management Private Enterprise Codes" value of the organisation that defined the AVP, for example 3GPP is 10415.

A Vendor-ID value of zero means the Vendor-ID is not specified. Standard AVPs defined by IETF will have a Vendor-ID of zero.

Returns:
the Vendor-ID, or zero if it is not specified.

getName

java.lang.String getName()
Return the AVP name, e.g., "Session-Id"

Returns:
the AVP name

getType

DiameterAvpType getType()
Return the AVP type (one of the String constants from org.mobicents.slee.resource.diameter.base.DiameterAvpType.

Returns:
the AVP type

getMandatoryRule

int getMandatoryRule()
Return the rule for the mandatory (M) flag of this AVP.

0 - MUST
1 - MAY
2 - MUSTNOT


getProtectedRule

int getProtectedRule()
Return the rule for the protected (P) flag of this AVP.

0 - MUST
1 - MAY
2 - MUSTNOT


doubleValue

double doubleValue()
The value of this AVP if the Diameter type can be represented in a Java double value (e.g., Float64, Float32)

Returns:
the AVP value as a double
Throws:
javax.naming.OperationNotSupportedException - if the AVP does not contain a double equivalent

floatValue

float floatValue()
The value of this AVP if the Diameter type can be represented in a Java float value (e.g., Float32)

Returns:
the AVP value as a float
Throws:
javax.naming.OperationNotSupportedException - if the AVP does not contain a float equivalent

intValue

int intValue()
The value of this AVP if the Diameter type can be represented in a Java int value (e.g., Integer32)

Returns:
the AVP value as an int
Throws:
javax.naming.OperationNotSupportedException - if the AVP does not contain an int equivalent

longValue

long longValue()
The value of this AVP if the Diameter type can be represented in a Java long value (e.g., Integer64, Unsigned32, Integer32)

Returns:
the AVP value as a long
Throws:
javax.naming.OperationNotSupportedException - if the AVP does not contain a long equivalent

stringValue

java.lang.String stringValue()
The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)

Returns:
the AVP value as a String
Throws:
3588 - if the AVP does not contain a String equivalent

byteArrayValue

byte[] byteArrayValue()
Return the raw contents of this AVP

Returns:
the AVP value as a byte array

clone

java.lang.Object clone()
Creates and returns a deep copy of this AVP instance.

Returns:
a deep copy of this AVP.


Copyright © 2008. All Rights Reserved.