public class VendorSpecificAttribute extends RadiusAttribute
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
VENDOR_SPECIFIC
Radius attribute type code for Vendor-Specific
|
| 构造器和说明 |
|---|
VendorSpecificAttribute()
Constructs an empty Vendor-Specific attribute that can be read from a
Radius packet.
|
VendorSpecificAttribute(int vendorId)
Constructs a new Vendor-Specific attribute to be sent.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addSubAttribute(RadiusAttribute attribute)
Adds a sub-attribute to this attribute.
|
void |
addSubAttribute(String name,
String value)
Adds a sub-attribute with the specified name to this attribute.
|
int |
getChildVendorId()
Returns the vendor ID of the sub-attributes.
|
RadiusAttribute |
getSubAttribute(int type)
Returns a sub-attribute of the given type which may only occur once in
this attribute.
|
RadiusAttribute |
getSubAttribute(String type)
Returns a single sub-attribute of the given type name.
|
List |
getSubAttributes()
Returns the list of sub-attributes.
|
List |
getSubAttributes(int attributeType)
Returns all sub-attributes of this attribut which have the given type.
|
String |
getSubAttributeValue(String type)
Returns the value of the Radius attribute of the given type or null if
there is no such attribute.
|
void |
readAttribute(byte[] data,
int offset,
int length)
Reads a Vendor-Specific attribute and decodes the internal sub-attribute
structure.
|
void |
removeSubAttribute(RadiusAttribute attribute)
Removes the specified sub-attribute from this attribute.
|
void |
setChildVendorId(int childVendorId)
Sets the vendor ID of the child attributes.
|
void |
setDictionary(Dictionary dictionary)
Also copies the new dictionary to sub-attributes.
|
String |
toString()
Returns a string representation for debugging.
|
byte[] |
writeAttribute()
Renders this attribute as a byte array.
|
public static final int VENDOR_SPECIFIC
public VendorSpecificAttribute()
public VendorSpecificAttribute(int vendorId)
vendorId - vendor ID of the sub-attributespublic void setChildVendorId(int childVendorId)
childVendorId - public int getChildVendorId()
public void setDictionary(Dictionary dictionary)
setDictionary 在类中 RadiusAttributedictionary - dictionary to setRadiusAttribute.setDictionary(org.tinyradius.dictionary.Dictionary)public void addSubAttribute(RadiusAttribute attribute)
attribute - sub-attribute to addpublic void addSubAttribute(String name, String value)
name - name of the sub-attributevalue - value of the sub-attributeIllegalArgumentException - invalid sub-attribute name or valuepublic void removeSubAttribute(RadiusAttribute attribute)
attribute - RadiusAttribute to removepublic List getSubAttributes()
public List getSubAttributes(int attributeType)
attributeType - type of sub-attributes to getpublic RadiusAttribute getSubAttribute(int type)
type - sub-attribute typeRuntimeException - if there are multiple occurences of the
requested sub-attribute typepublic RadiusAttribute getSubAttribute(String type) throws RadiusException
type - attribute type nameRuntimeException - if the attribute occurs multiple timesRadiusExceptionpublic String getSubAttributeValue(String type) throws RadiusException
type - attribute type nameIllegalArgumentException - if the type name is unknownRuntimeException - attribute occurs multiple timesRadiusExceptionpublic byte[] writeAttribute()
writeAttribute 在类中 RadiusAttributeRadiusAttribute.writeAttribute()public void readAttribute(byte[] data,
int offset,
int length)
throws RadiusException
public String toString()
toString 在类中 RadiusAttributeRadiusAttribute.toString()Copyright © 2016. All rights reserved.