|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.diameter.packet.Avp
com.ibm.diameter.packet.VsAvp
public class VsAvp
The VsAvp class is used to construct a vendor specific Diameter Attribute Value Pair (AVP). Diameter AVPs are used in Diameter messages to supply configuration details or provide specific application information.
Field Summary | |
---|---|
static int |
VS_AVP_HDR_SIZE
The header of a vendor specific AVP is always 12 bytes |
Fields inherited from class com.ibm.diameter.packet.Avp |
---|
avpLength, M_BIT, P_BIT, R_BITS, V_BIT, VOFF_MOFF_POFF, VOFF_MOFF_PON, VOFF_MON_POFF, VOFF_MON_PON, VON_MOFF_POFF, VON_MOFF_PON, VON_MON_POFF, VON_MON_PON |
Constructor Summary | |
---|---|
VsAvp()
Creates an instance of VsAvp . |
|
VsAvp(int avpCode,
byte avpFlags,
AvpValueUtil avpValue,
int avpVendorId)
Creates an instance of VsAvp . |
|
VsAvp(int avpCode,
byte avpFlags,
int length,
AvpValueUtil avpValue,
int avpVendorId)
Creates an instance of VsAvp . |
Method Summary | |
---|---|
int |
getAvpVendorId()
Returns the IANA assigned Vendor-ID for this AVP. |
boolean |
isValid()
isValid() checks to see if AVP is valid Checks include: V_Bit must be on for a vendor specific AVP. |
void |
setAvpValueUtil(AvpValueUtil avpValue)
Sets the AvpValueUtil object which is used to read the value of this AVP. |
void |
setAvpVendorId(int avpVendorId)
Sets the IANA assigned Vendor-ID for this AVP. |
void |
toDataOutputStream(java.io.DataOutputStream out)
Writes the VsAvp to the DataOutputStream , including the header
information and the value of the AVP contained within the AvpValueUtil instance. |
void |
toDiamWsByteBufferOutputStream(com.ibm.diameter.util.DiamWsByteBufferOutputStream out)
Writes the VsAvp to the DiamWsByteBufferOutputStream , including the header
information and the value of the AVP contained within the AvpValueUtil instance. |
java.lang.String |
toString()
Returns a String representation of the Avp. |
Methods inherited from class com.ibm.diameter.packet.Avp |
---|
getAvpCode, getAvpFlags, getAvpLength, getAvpValueUtil, isMBit, isPBit, isVBit, setAvpCode, setAvpFlags, setAvpLength, setMBit, setPBit, setVBit, toString2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int VS_AVP_HDR_SIZE
Constructor Detail |
---|
public VsAvp()
VsAvp
. This constructor should not typically be used.
public VsAvp(int avpCode, byte avpFlags, AvpValueUtil avpValue, int avpVendorId)
VsAvp
. Note that the length is not included. It is
calculated using the AvpValueUtil
class.
avpCode
- Identifier of the AVPavpFlags
- Tells the receiver how the attribute should be handled. It is of the form VMPrrrrr.
The V, or Vendor-Specific, bit indicates whether the Vendor Id field is present in the header. The
M, or Mandatory, bit indicates whether support of this AVP is required or not. The P bit indicates
the need for encryption. However, this bit is obsolete and should always be zero.
The r, or reserved, bits are unused in this release and should be set to 0.avpValue
- An instance of the AvpValueUtil
class that contains the value in a form
that the class knows how to interpret.avpVendorId
- The IANA assigned Vendor-ID for this vendorpublic VsAvp(int avpCode, byte avpFlags, int length, AvpValueUtil avpValue, int avpVendorId)
VsAvp
.
avpCode
- Identifier of the AVPavpFlags
- Tells the receiver how the attribute should be handled. It is of the form VMPrrrrr.
The V, or Vendor-Specific, bit indicates whether the Vendor Id field is present in the header. The
M, or Mandatory, bit indicates whether support of this AVP is required or not. The P bit indicates
the need for encryption. However, this bit is obsolete and should always be zero.
The r, or reserved, bits are unused in this release and should be set to 0.avpValue
- An instance of the AvpValueUtil
class that contains the value in a form
that the class knows how to interpret.length
- The length of the VsAvp
that is being created.avpVendorId
- The IANA assigned Vendor-ID for this vendorMethod Detail |
---|
public int getAvpVendorId()
public void setAvpVendorId(int avpVendorId)
avpVendorId
- The avp vendor id to set.public void setAvpValueUtil(AvpValueUtil avpValue)
AvpValueUtil
object which is used to read the value of this AVP.
setAvpValueUtil
in class Avp
avpValue
- an instance of AvpValueUtil that contains the data as well as a method to retrieve the data.public boolean isValid()
isValid
in class Avp
public void toDiamWsByteBufferOutputStream(com.ibm.diameter.util.DiamWsByteBufferOutputStream out)
VsAvp
to the DiamWsByteBufferOutputStream
, including the header
information and the value of the AVP contained within the AvpValueUtil
instance.
toDiamWsByteBufferOutputStream
in class Avp
out
- The output stream to write the VsAvp
to.public void toDataOutputStream(java.io.DataOutputStream out)
VsAvp
to the DataOutputStream
, including the header
information and the value of the AVP contained within the AvpValueUtil
instance.
toDataOutputStream
in class Avp
out
- The output stream to write the VsAvp
to.public java.lang.String toString()
toString
in class Avp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |