Package org.tinyradius.core.dictionary
Interface Dictionary
- All Superinterfaces:
CoreDictionary
- All Known Subinterfaces:
WritableDictionary
- All Known Implementing Classes:
MemoryDictionary
public interface Dictionary extends CoreDictionary
A dictionary retrieves AttributeTemplate objects by name or attribute ID.
-
Method Summary
Modifier and Type Method Description default RadiusAttribute
createAttribute(int vendorId, byte type, byte[] value)
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.default RadiusAttribute
createAttribute(int vendorId, byte type, byte tag, byte[] value)
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.default RadiusAttribute
createAttribute(int vendorId, byte type, byte tag, java.lang.String value)
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.default RadiusAttribute
createAttribute(int vendorId, byte type, java.lang.String value)
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.default RadiusAttribute
createAttribute(java.lang.String name, java.lang.String value)
Convenience method to create a Radius attribute.default RadiusAttribute
parseAttribute(int vendorId, byte type, byte[] rawData)
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.Methods inherited from interface org.tinyradius.core.dictionary.CoreDictionary
getAttributeTemplate, getAttributeTemplate, getAttributeTemplate, getVendorId, getVendorName
-
Method Details
-
createAttribute
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.- Parameters:
vendorId
- vendor ID or -1type
- attribute typevalue
- attribute data as byte array- Returns:
- RadiusAttribute object
-
createAttribute
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.- Parameters:
vendorId
- vendor ID or -1type
- attribute typetag
- tag as per RFC2868, nullable, ignored if not supported by attributevalue
- attribute data as byte array- Returns:
- RadiusAttribute object
-
createAttribute
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.- Parameters:
vendorId
- vendor ID or -1type
- attribute typevalue
- attribute data as String- Returns:
- RadiusAttribute object
-
createAttribute
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.- Parameters:
vendorId
- vendor ID or -1type
- attribute typetag
- tag as per RFC2868, nullable, ignored if not supported by attributevalue
- attribute data as String- Returns:
- RadiusAttribute object
-
createAttribute
Convenience method to create a Radius attribute.Uses AttributeTemplate to lookup the type code and parses String value depending on the type.
If attribute has tag field, will be set to 0x00.
- Parameters:
name
- name of the attribute, for example "NAS-IP-Address", should NOT be 'Vendor-Specific'value
- value of the attribute, for example "127.0.0.1"- Returns:
- RadiusAttribute object
-
parseAttribute
Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.- Parameters:
vendorId
- vendor ID or -1type
- attribute typerawData
- attribute data to parse excl. type/length- Returns:
- RadiusAttribute object
-