org.mobicents.slee.resource.diameter.base.events.avp
Class GroupedAvpImpl

java.lang.Object
  extended by org.mobicents.slee.resource.diameter.base.events.avp.DiameterAvpImpl
      extended by org.mobicents.slee.resource.diameter.base.events.avp.GroupedAvpImpl
All Implemented Interfaces:
java.lang.Cloneable, DiameterAvp, GroupedAvp
Direct Known Subclasses:
ExperimentalResultAvpImpl, FailedAvpImpl, ProxyInfoAvpImpl, VendorSpecificApplicationIdAvpImpl

public class GroupedAvpImpl
extends DiameterAvpImpl
implements GroupedAvp

GroupedAvpImpl.java
Super project: mobicents
12:05:02 PM Jul 8, 2008

Author:
Bartosz Baranowski , Alexandre Mendonca , Erick Svenson

Field Summary
protected  org.jdiameter.api.AvpSet avpSet
           
 
Fields inherited from class org.mobicents.slee.resource.diameter.base.events.avp.DiameterAvpImpl
code, log, mnd, name, parser, prt, type, vendorId
 
Fields inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
 
Constructor Summary
GroupedAvpImpl(int code, long vendorId, int mnd, int prt, byte[] value)
           
 
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)
protected  long[] getAllAvpAsUInt32(int code)
           
protected  DiameterIdentityAvp getAvpAsIdentity(int code)
           
protected  long getAvpAsUInt32(int code)
           
 DiameterAvp[] getExtensionAvps()
          Returns the set of extension AVPs.
 boolean hasExtensionAvps()
           
 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)
protected  void setAvpAsByteArray(int code, byte[] value, boolean mandatory)
           
protected  void setAvpAsIdentity(int code, java.lang.String value, boolean octet, boolean mandatory, boolean... remove)
           
protected  void setAvpAsUInt32(int code, long value, boolean mandatory, boolean... remove)
           
 void setExtensionAvps(DiameterAvp[] extensions)
          Sets the set of extension AVPs with all the values in the given array.
 java.lang.String stringValue()
          The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)
 
Methods inherited from class org.mobicents.slee.resource.diameter.base.events.avp.DiameterAvpImpl
getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorId, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorId
 

Field Detail

avpSet

protected org.jdiameter.api.AvpSet avpSet
Constructor Detail

GroupedAvpImpl

public GroupedAvpImpl(int code,
                      long vendorId,
                      int mnd,
                      int prt,
                      byte[] value)
Method Detail

setExtensionAvps

public void setExtensionAvps(DiameterAvp[] extensions)
                      throws AvpNotAllowedException
Description copied from interface: GroupedAvp
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.

Specified by:
setExtensionAvps in interface GroupedAvp
Throws:
AvpNotAllowedException

getExtensionAvps

public DiameterAvp[] getExtensionAvps()
Description copied from interface: GroupedAvp
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the message. A return value of null implies that no extensions AVPs have been set.

Specified by:
getExtensionAvps in interface GroupedAvp
Returns:

doubleValue

public double doubleValue()
Description copied from interface: DiameterAvp
The value of this AVP if the Diameter type can be represented in a Java double value (e.g., Float64, Float32)

Specified by:
doubleValue in interface DiameterAvp
Overrides:
doubleValue in class DiameterAvpImpl
Returns:
the AVP value as a double

floatValue

public float floatValue()
Description copied from interface: DiameterAvp
The value of this AVP if the Diameter type can be represented in a Java float value (e.g., Float32)

Specified by:
floatValue in interface DiameterAvp
Overrides:
floatValue in class DiameterAvpImpl
Returns:
the AVP value as a float

intValue

public int intValue()
Description copied from interface: DiameterAvp
The value of this AVP if the Diameter type can be represented in a Java int value (e.g., Integer32)

Specified by:
intValue in interface DiameterAvp
Overrides:
intValue in class DiameterAvpImpl
Returns:
the AVP value as an int

longValue

public long longValue()
Description copied from interface: DiameterAvp
The value of this AVP if the Diameter type can be represented in a Java long value (e.g., Integer64, Unsigned32, Integer32)

Specified by:
longValue in interface DiameterAvp
Overrides:
longValue in class DiameterAvpImpl
Returns:
the AVP value as a long

stringValue

public java.lang.String stringValue()
Description copied from interface: DiameterAvp
The value of this AVP if the Diameter type is equivalent to a Java String value (e.g., UTF8String)

Specified by:
stringValue in interface DiameterAvp
Overrides:
stringValue in class DiameterAvpImpl
Returns:
the AVP value as a String

hasExtensionAvps

public boolean hasExtensionAvps()
Specified by:
hasExtensionAvps in interface GroupedAvp

byteArrayValue

public byte[] byteArrayValue()
Description copied from interface: DiameterAvp
Return the raw contents of this AVP

Specified by:
byteArrayValue in interface DiameterAvp
Overrides:
byteArrayValue in class DiameterAvpImpl
Returns:
the AVP value as a byte array

clone

public java.lang.Object clone()
Description copied from interface: DiameterAvp
Creates and returns a deep copy of this AVP instance.

Specified by:
clone in interface DiameterAvp
Overrides:
clone in class DiameterAvpImpl
Returns:
a deep copy of this AVP.

setAvpAsIdentity

protected void setAvpAsIdentity(int code,
                                java.lang.String value,
                                boolean octet,
                                boolean mandatory,
                                boolean... remove)

getAvpAsIdentity

protected DiameterIdentityAvp getAvpAsIdentity(int code)

setAvpAsByteArray

protected void setAvpAsByteArray(int code,
                                 byte[] value,
                                 boolean mandatory)

setAvpAsUInt32

protected void setAvpAsUInt32(int code,
                              long value,
                              boolean mandatory,
                              boolean... remove)

getAvpAsUInt32

protected long getAvpAsUInt32(int code)

getAllAvpAsUInt32

protected long[] getAllAvpAsUInt32(int code)


Copyright © 2008. All Rights Reserved.