Package org.tinyradius.dictionary
Interface Dictionary
- All Known Subinterfaces:
WritableDictionary
- All Known Implementing Classes:
MemoryDictionary
public interface Dictionary
A dictionary retrieves AttributeType objects by name or
type code.
-
Method Summary
Modifier and Type Method Description default AttributeType
getAttributeTypeByCode(byte type)
Returns the AttributeType for the vendor -1 from the cache.AttributeType
getAttributeTypeByCode(int vendorId, byte type)
Retrieves an attribute type for a vendor-specific attribute.AttributeType
getAttributeTypeByName(java.lang.String typeName)
Retrieves an attribute type by name.int
getVendorId(java.lang.String vendorName)
Retrieves the ID of the vendor with the given name.java.lang.String
getVendorName(int vendorId)
Retrieves the name of the vendor with the given vendor code.
-
Method Details
-
getAttributeTypeByName
Retrieves an attribute type by name. This includes vendor-specific attribute types whose name is prefixed by the vendor name.- Parameters:
typeName
- name of the attribute type- Returns:
- AttributeType object or null
-
getAttributeTypeByCode
Returns the AttributeType for the vendor -1 from the cache.- Parameters:
type
- type code- Returns:
- AttributeType object or null
-
getAttributeTypeByCode
Retrieves an attribute type for a vendor-specific attribute.- Parameters:
vendorId
- vendor IDtype
- type code, 1-255- Returns:
- AttributeType object or null
-
getVendorName
java.lang.String getVendorName(int vendorId)Retrieves the name of the vendor with the given vendor code.- Parameters:
vendorId
- vendor number- Returns:
- vendor name or null
-
getVendorId
int getVendorId(java.lang.String vendorName)Retrieves the ID of the vendor with the given name.- Parameters:
vendorName
- name of the vendor- Returns:
- vendor ID or -1
-